Exception: OData::HTTPError
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(response) ⇒ HTTPError
constructor
A new instance of HTTPError.
Constructor Details
#initialize(response) ⇒ HTTPError
5 6 7 8 9 10 |
# File 'lib/odata/errors.rb', line 5 def initialize(response) body = JSON.parse(response.body) super "#{response.code} #{body['error']['code']}: \"#{body['error']['message']}\" from \"#{response.uri}\"" rescue super end |