lib/rdstation/error_handler.rb in rdstation-ruby-client-2.1.0 vs lib/rdstation/error_handler.rb in rdstation-ruby-client-2.2.0

- old
+ new

@@ -11,9 +11,11 @@ def raise_error raise error_class, array_of_errors.first if error_class < RDStation::Error error_class.new(array_of_errors).raise_error + rescue JSON::ParserError => error + raise error_class, { 'error_message' => response.body } end private attr_reader :response, :code