Exception: MaxBotApi::NetworkError
- Defined in:
- lib/max_bot_api/errors.rb
Overview
Raised when the HTTP request fails before reaching the API.
Instance Attribute Summary collapse
-
#op ⇒ Object
readonly
Returns the value of attribute op.
-
#original_error ⇒ Object
readonly
Returns the value of attribute original_error.
Instance Method Summary collapse
-
#initialize(op:, original_error:) ⇒ NetworkError
constructor
A new instance of NetworkError.
Constructor Details
#initialize(op:, original_error:) ⇒ NetworkError
Returns a new instance of NetworkError.
49 50 51 52 53 |
# File 'lib/max_bot_api/errors.rb', line 49 def initialize(op:, original_error:) @op = op @original_error = original_error super("network error during #{op}: #{original_error}") end |
Instance Attribute Details
#op ⇒ Object (readonly)
Returns the value of attribute op.
45 46 47 |
# File 'lib/max_bot_api/errors.rb', line 45 def op @op end |
#original_error ⇒ Object (readonly)
Returns the value of attribute original_error.
45 46 47 |
# File 'lib/max_bot_api/errors.rb', line 45 def original_error @original_error end |