Class: Reservix::ResponseError
- Inherits:
-
HTTParty::ResponseError
- Object
- HTTParty::ResponseError
- Reservix::ResponseError
- Defined in:
- lib/reservix/response_error.rb
Constant Summary collapse
- STATUS_CODES =
{ 400 => "Bad Request", 403 => "Forbidden", 404 => "Not Found", 412 => "Precondition Failed", 500 => "Internal Server Error", 501 => "Not Implemented" }
Instance Method Summary collapse
Instance Method Details
#message ⇒ Object
12 13 14 15 16 17 |
# File 'lib/reservix/response_error.rb', line 12 def error = response.parsed_response "HTTP status: #{response.code} #{STATUS_CODES[response.code]} Error: #{error}" rescue "HTTP status: #{response.code} #{STATUS_CODES[response.code]}" end |