Exception: Fanforce::API::DecodingError
- Inherits:
-
Error
- Object
- StandardError
- Error
- Fanforce::API::DecodingError
show all
- Defined in:
- lib/fanforce/api/error.rb
Instance Attribute Summary
Attributes inherited from Error
#errors, #request, #requested_params, #requested_url, #response
Instance Method Summary
collapse
Methods inherited from Error
#curl_command, #to_s
Constructor Details
#initialize(e, response, request, requested_url, requested_params) ⇒ DecodingError
55
56
57
58
59
|
# File 'lib/fanforce/api/error.rb', line 55
def initialize(e, response, request, requested_url, requested_params)
@message = "There was a Fanforce gem error while decoding JSON response: #{e.message}"
@errors = [{message: @message}]
super(@message, response, request, requested_url, requested_params)
end
|
Instance Method Details
#code ⇒ Object
65
|
# File 'lib/fanforce/api/error.rb', line 65
def code; 500 end
|
#to_hash ⇒ Object
61
62
63
|
# File 'lib/fanforce/api/error.rb', line 61
def to_hash
{errors: @errors}
end
|