Exception: ShedCloud::PartnerApi::AuthError
- Inherits:
-
StandardError
- Object
- StandardError
- ShedCloud::PartnerApi::AuthError
- Defined in:
- lib/shedcloud/partner_api/errors.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(message, status:, body: nil, code: nil) ⇒ AuthError
constructor
A new instance of AuthError.
- #unauthorized? ⇒ Boolean
Constructor Details
#initialize(message, status:, body: nil, code: nil) ⇒ AuthError
Returns a new instance of AuthError.
34 35 36 37 38 39 |
# File 'lib/shedcloud/partner_api/errors.rb', line 34 def initialize(, status:, body: nil, code: nil) @status = status @body = body @code = code super(()) end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
32 33 34 |
# File 'lib/shedcloud/partner_api/errors.rb', line 32 def body @body end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
32 33 34 |
# File 'lib/shedcloud/partner_api/errors.rb', line 32 def code @code end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
32 33 34 |
# File 'lib/shedcloud/partner_api/errors.rb', line 32 def status @status end |
Instance Method Details
#unauthorized? ⇒ Boolean
41 |
# File 'lib/shedcloud/partner_api/errors.rb', line 41 def = status == 401 |