Class: RelicLink::Coh3::Api::Errors::RelicError
- Inherits:
-
Faraday::Error
- Object
- Faraday::Error
- RelicLink::Coh3::Api::Errors::RelicError
- Defined in:
- lib/relic_link/coh3/api/errors/relic_error.rb
Overview
Base wrapper for Relic CoH3 API errors.
Direct Known Subclasses
ExpiredPath, NotFound, UnknownAliases, UnknownProfileIds, UnregisteredProfileName
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
- #error ⇒ Object
- #errors ⇒ Object
-
#initialize(message, response = nil) ⇒ RelicError
constructor
A new instance of RelicError.
- #response_metadata ⇒ Object
Constructor Details
#initialize(message, response = nil) ⇒ RelicError
Returns a new instance of RelicError.
11 12 13 14 |
# File 'lib/relic_link/coh3/api/errors/relic_error.rb', line 11 def initialize(, response = nil) super() @response = response end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
9 10 11 |
# File 'lib/relic_link/coh3/api/errors/relic_error.rb', line 9 def response @response end |
Instance Method Details
#error ⇒ Object
16 17 18 |
# File 'lib/relic_link/coh3/api/errors/relic_error.rb', line 16 def error response.body.error end |
#errors ⇒ Object
20 21 22 |
# File 'lib/relic_link/coh3/api/errors/relic_error.rb', line 20 def errors response.body.errors end |
#response_metadata ⇒ Object
24 25 26 |
# File 'lib/relic_link/coh3/api/errors/relic_error.rb', line 24 def response.body. end |