lib/expedia/errors.rb in expedia-0.0.1 vs lib/expedia/errors.rb in expedia-0.0.2
- old
+ new
@@ -2,21 +2,21 @@
class ExpediaError < StandardError; end
# Expedia respondes with status of 200 even if there is an exception (most of the time)
class APIError < ::Expedia::ExpediaError
-
+
# @status The HTTP status code of the response
# @error_body The parsed response body
# @error_info One of the following:
# @category Value indicating the nature of the exception or the reason it occurred
# @presentation_message Presentation error message returned
# @verbose_message More specific detailed error message
# @handling value indicating the severity of the exception and how it may be handled
attr_accessor :category, :presentation_message, :verbose_message,
- :status, :error_body, :handling
+ :status, :error_body, :handling
# Create a new API Error
# @return the newly created APIError
def initialize(status, body)
@error_body = body
@@ -32,11 +32,11 @@
@presentation_message = error_body['presentationMessage']
@verbose_message = error_body['verboseMessage']
@handling = error_body['handling']
error_array = []
end
-
+
super(@verbose_message)
end
# Just to enable user to call this method on response object to know if any exception has occured
@@ -47,6 +47,6 @@
end
# A standard Error calss for Raising exception if [cid, shared_secret, api_key] are not provided.
class AuthCredentialsError < ::Expedia::ExpediaError; end
-end
\ No newline at end of file
+end