Exception: Boltless::Errors::ResponseError
- Inherits:
-
StandardError
- Object
- StandardError
- Boltless::Errors::ResponseError
- Defined in:
- lib/boltless/errors/response_error.rb
Overview
A generic response error, for everything neo4j want to tell us
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#message ⇒ Object
We allow to read our details.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(message, code: nil, response: nil) ⇒ Errors::RequestError
constructor
Create a new generic response error instance.
Constructor Details
#initialize(message, code: nil, response: nil) ⇒ Errors::RequestError
Create a new generic response error instance.
19 20 21 22 23 24 25 26 27 |
# File 'lib/boltless/errors/response_error.rb', line 19 def initialize(, code: nil, response: nil) formatted = "#{} (#{code})" if && code formatted = code unless formatted ||= super(formatted) @message = formatted @code = code @response = response end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
9 10 11 |
# File 'lib/boltless/errors/response_error.rb', line 9 def code @code end |
#message ⇒ Object
We allow to read our details
8 9 10 |
# File 'lib/boltless/errors/response_error.rb', line 8 def @message end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
9 10 11 |
# File 'lib/boltless/errors/response_error.rb', line 9 def response @response end |