Exception: TezosClient::RpcRequestFailure
- Inherits:
-
StandardError
- Object
- StandardError
- TezosClient::RpcRequestFailure
- Defined in:
- lib/tezos_client/exceptions.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#status_code ⇒ Object
readonly
Returns the value of attribute status_code.
Instance Method Summary collapse
-
#initialize(error:, url:, status_code:) ⇒ RpcRequestFailure
constructor
A new instance of RpcRequestFailure.
Constructor Details
#initialize(error:, url:, status_code:) ⇒ RpcRequestFailure
Returns a new instance of RpcRequestFailure.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/tezos_client/exceptions.rb', line 8 def initialize(error:, url:, status_code:) @status_code = status_code @error = error if @message.nil? @message = "#{url} failed with status #{status_code}:\n #{error}" end super @message end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
6 7 8 |
# File 'lib/tezos_client/exceptions.rb', line 6 def error @error end |
#status_code ⇒ Object (readonly)
Returns the value of attribute status_code.
5 6 7 |
# File 'lib/tezos_client/exceptions.rb', line 5 def status_code @status_code end |