Exception: Blockchain0x::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/blockchain0x/errors.rb

Direct Known Subclasses

APIKeyError, WebhookSignatureError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code:, message:, http_status: nil, request_id: nil) ⇒ Error

Returns a new instance of Error.



24
25
26
27
28
29
# File 'lib/blockchain0x/errors.rb', line 24

def initialize(code:, message:, http_status: nil, request_id: nil)
  super("#{code}: #{message}")
  @code = code
  @http_status = http_status
  @request_id = request_id
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



22
23
24
# File 'lib/blockchain0x/errors.rb', line 22

def code
  @code
end

#http_statusObject (readonly)

Returns the value of attribute http_status.



22
23
24
# File 'lib/blockchain0x/errors.rb', line 22

def http_status
  @http_status
end

#request_idObject (readonly)

Returns the value of attribute request_id.



22
23
24
# File 'lib/blockchain0x/errors.rb', line 22

def request_id
  @request_id
end