Exception: DLException
- Inherits:
-
Exception
- Object
- Exception
- DLException
- Defined in:
- lib/datalanche/exception.rb
Instance Attribute Summary collapse
-
#detail ⇒ Object
Returns the value of attribute detail.
-
#status_code ⇒ Object
Returns the value of attribute status_code.
Instance Method Summary collapse
-
#initialize(status_code, body, debug_info) ⇒ DLException
constructor
A new instance of DLException.
Constructor Details
#initialize(status_code, body, debug_info) ⇒ DLException
Returns a new instance of DLException.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/datalanche/exception.rb', line 7 def initialize(status_code, body, debug_info) @request = debug_info['request'] @response = debug_info['response'] @response['body'] = body @error_message = debug_info['response']['message'] @error_type = body @status_code = status_code @detail = { 'status_code' => @status_code, 'error_message' => @error_message, 'error_type' => @error_type, 'request' => @request, 'response' => @response } end |
Instance Attribute Details
#detail ⇒ Object
Returns the value of attribute detail.
5 6 7 |
# File 'lib/datalanche/exception.rb', line 5 def detail @detail end |
#status_code ⇒ Object
Returns the value of attribute status_code.
5 6 7 |
# File 'lib/datalanche/exception.rb', line 5 def status_code @status_code end |