lib/rdstation/error_handler.rb in rdstation-ruby-client-2.3.1 vs lib/rdstation/error_handler.rb in rdstation-ruby-client-2.4.0

- old
+ new

@@ -30,10 +30,11 @@ when 405 then RDStation::Error::MethodNotAllowed when 406 then RDStation::Error::NotAcceptable when 409 then RDStation::Error::Conflict when 415 then RDStation::Error::UnsupportedMediaType when 422 then RDStation::Error::UnprocessableEntity + when 429 then RDStation::Error::TooManyRequests when 500 then RDStation::Error::InternalServerError when 501 then RDStation::Error::NotImplemented when 502 then RDStation::Error::BadGateway when 503 then RDStation::Error::ServiceUnavailable when 500..599 then RDStation::Error::ServerError @@ -55,10 +56,10 @@ def error_formatter @error_formatter = RDStation::Error::Formatter.new(response_errors) end def additional_error_attributes - { + attrs = { 'headers' => response.headers, 'body' => JSON.parse(response.body), 'http_status' => response.code, } end