Exception: Theoldreader::APIError

Inherits:
TheoldreaderError show all
Defined in:
lib/theoldreader/errors.rb

Direct Known Subclasses

ClientError, ServerError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status, response_body, errors) ⇒ APIError

Returns a new instance of APIError.



6
7
8
# File 'lib/theoldreader/errors.rb', line 6

def initialize(status, response_body, errors)
  super("status: #{status}, body: #{response_body}, errors: #{errors.to_s}")
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



4
5
6
# File 'lib/theoldreader/errors.rb', line 4

def errors
  @errors
end

#response_bodyObject (readonly)

Returns the value of attribute response_body.



4
5
6
# File 'lib/theoldreader/errors.rb', line 4

def response_body
  @response_body
end

#statusObject (readonly)

Returns the value of attribute status.



4
5
6
# File 'lib/theoldreader/errors.rb', line 4

def status
  @status
end