Exception: Belvo::RequestError

Inherits:
BelvoAPIError show all
Defined in:
lib/belvo/exceptions.rb

Overview

Generic request error, any response with status different than 2xx.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, status_code, detail) ⇒ RequestError



25
26
27
28
29
# File 'lib/belvo/exceptions.rb', line 25

def initialize(message, status_code, detail)
  super(message)
  @status_code = status_code
  @detail = detail
end

Instance Attribute Details

#detailJSON (readonly)

Error message returned by Belvo API



20
21
22
# File 'lib/belvo/exceptions.rb', line 20

def detail
  @detail
end

#status_codeInteger (readonly)

HTTP code returned by Belvo API



16
17
18
# File 'lib/belvo/exceptions.rb', line 16

def status_code
  @status_code
end