Exception: Belvo::RequestError
- Inherits:
-
BelvoAPIError
- Object
- StandardError
- BelvoAPIError
- Belvo::RequestError
- Defined in:
- lib/belvo/exceptions.rb
Overview
Generic request error, any response with status different than 2xx.
Instance Attribute Summary collapse
-
#detail ⇒ JSON
readonly
Error message returned by Belvo API.
-
#status_code ⇒ Integer
readonly
HTTP code returned by Belvo API.
Instance Method Summary collapse
-
#initialize(message, status_code, detail) ⇒ RequestError
constructor
A new instance of RequestError.
Constructor Details
#initialize(message, status_code, detail) ⇒ RequestError
Returns a new instance of RequestError.
25 26 27 28 29 |
# File 'lib/belvo/exceptions.rb', line 25 def initialize(, status_code, detail) super() @status_code = status_code @detail = detail end |
Instance Attribute Details
#detail ⇒ JSON (readonly)
Error message returned by Belvo API
20 21 22 |
# File 'lib/belvo/exceptions.rb', line 20 def detail @detail end |
#status_code ⇒ Integer (readonly)
HTTP code returned by Belvo API
16 17 18 |
# File 'lib/belvo/exceptions.rb', line 16 def status_code @status_code end |