Exception: Sudhanva::APIError
- Inherits:
-
StandardError
- Object
- StandardError
- Sudhanva::APIError
- Defined in:
- lib/sudhanva/client.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(status:, code:, message:, body:) ⇒ APIError
constructor
A new instance of APIError.
Constructor Details
#initialize(status:, code:, message:, body:) ⇒ APIError
Returns a new instance of APIError.
13 14 15 16 17 18 |
# File 'lib/sudhanva/client.rb', line 13 def initialize(status:, code:, message:, body:) super("#{status} #{code}: #{}") @status = status @code = code @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
11 12 13 |
# File 'lib/sudhanva/client.rb', line 11 def body @body end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
11 12 13 |
# File 'lib/sudhanva/client.rb', line 11 def code @code end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
11 12 13 |
# File 'lib/sudhanva/client.rb', line 11 def status @status end |