class ContentfulLite::Client::RequestError
Attributes
body[R]
response[R]
Public Class Methods
new(response, body)
click to toggle source
Calls superclass method
# File lib/contentful_lite/client.rb, line 8 def initialize(response, body) @response = response @body = body super(body['sys'] && body['sys']['type'] == 'Error' ? "#{body['sys']['id']}: #{body['message']}" : "Invalid Contentful Response: #{body}") end