Exception: Aspera::RestCallError
- Inherits:
-
StandardError
- Object
- StandardError
- Aspera::RestCallError
- Defined in:
- lib/aspera/rest_call_error.rb
Overview
raised on error after REST call
Instance Method Summary collapse
- #data ⇒ Object
-
#initialize(context) ⇒ RestCallError
constructor
A new instance of RestCallError.
- #request ⇒ Object
- #response ⇒ Object
Constructor Details
#initialize(context) ⇒ RestCallError
19 20 21 22 23 |
# File 'lib/aspera/rest_call_error.rb', line 19 def initialize(context) context = {messages: [context]} if context.is_a?(String) @context = context super(@context[:messages].join("\n")) end |
Instance Method Details
#data ⇒ Object
14 15 16 |
# File 'lib/aspera/rest_call_error.rb', line 14 def data @context[:data] end |
#request ⇒ Object
6 7 8 |
# File 'lib/aspera/rest_call_error.rb', line 6 def request @context[:request] end |
#response ⇒ Object
10 11 12 |
# File 'lib/aspera/rest_call_error.rb', line 10 def response @context[:response] end |