Exception: DhanHQ::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/DhanHQ/errors.rb,
lib/dhan_hq.rb

Overview

Base error class for all DhanHQ API errors. When raised from API response handling, #response_body holds the parsed error payload.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, response_body: nil) ⇒ Error

Returns a new instance of Error.



9
10
11
12
# File 'lib/DhanHQ/errors.rb', line 9

def initialize(message = nil, response_body: nil)
  super(message)
  @response_body = response_body
end

Instance Attribute Details

#response_bodyObject (readonly)

Returns the value of attribute response_body.



7
8
9
# File 'lib/DhanHQ/errors.rb', line 7

def response_body
  @response_body
end