lib/eps-rapid/client.rb in eps-rapid-1.2.0 vs lib/eps-rapid/client.rb in eps-rapid-1.2.1

- old
+ new

@@ -95,9 +95,11 @@ when HttpStatusCodes::HTTP_ACCEPTED_CODE { 'status' => 202 } when HttpStatusCodes::HTTP_NO_CONTENT_CODE { 'status' => 204 } else + logger.warn("Request with error: #{uri} headers=(#{req.to_hash}): body=(#{req.body})") + logger.warn("Response with error: #{response.code} headers=(#{response.to_hash}): body=(#{response.body})") raise error_class(response.code), "Code: #{response.code}, Error: #{map_error_messages(response.body)}" end end def error_class(code)