lib/aptly_command.rb in aptly_cli-0.6.0 vs lib/aptly_command.rb in aptly_cli-0.6.1

- old
+ new

@@ -92,16 +92,16 @@ def process_response(response) json_response = JSON.parse response.body raise "[Server] #{json_response['error']}" unless !json_response.is_a?(Hash) || json_response.dig('error').nil? - raise HttpNotFoundError, "#{json_response}" if response.code == 404 - raise HttpInternalServerError, "#{json_response}" if response.code == 500 + raise HttpNotFoundError, "[HTTP Not Found Error] JSON response:\n#{json_response}" if response.code == 404 + raise HttpInternalServerError, "[HTTP Internal Server Error] JSON response:\n#{json_response}" if response.code == 500 response rescue JSON::ParserError - raise HttpNotFoundError, "#{json_response}" if response.code == 404 - raise HttpInternalServerError, "#{json_response}" if response.code == 500 + raise HttpNotFoundError, "[HTTP Not Found Error] Response:\n#{response.body}" if response.code == 404 + raise HttpInternalServerError, "[HTTP Internal Server Error] Response:\n#{response.body}" if response.code == 500 response end end end