Exception: Tremendous::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Tremendous::Error
show all
- Defined in:
- lib/tremendous/error.rb
Instance Method Summary
collapse
Constructor Details
#initialize(response) ⇒ Error
Returns a new instance of Error.
4
5
6
7
|
# File 'lib/tremendous/error.rb', line 4
def initialize(response)
@response = response
super
end
|
Instance Method Details
#message ⇒ Object
13
14
15
|
# File 'lib/tremendous/error.rb', line 13
def message
"Code: #{@response.code}; Data: #{server_response[:errors]}"
end
|
#server_response ⇒ Object
9
10
11
|
# File 'lib/tremendous/error.rb', line 9
def server_response
@server_response ||= @response.parsed_response.with_indifferent_access
end
|