Class: Ffccmmx::Response
- Inherits:
-
Object
- Object
- Ffccmmx::Response
- Defined in:
- lib/ffccmmx/response.rb
Instance Method Summary collapse
-
#initialize(response) ⇒ Response
constructor
A new instance of Response.
- #value ⇒ Object
Constructor Details
#initialize(response) ⇒ Response
Returns a new instance of Response.
7 8 9 |
# File 'lib/ffccmmx/response.rb', line 7 def initialize(response) @response = response end |
Instance Method Details
#value ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/ffccmmx/response.rb', line 11 def value @response.raise_for_status rescue HTTPX::Error => e raise Ffccmmx::HTTPXRetryableError.new(e.response), cause: e if Ffccmmx::HTTPXRetryableError.retryable_error?(e) raise Ffccmmx::HTTPXError.new(e.response), cause: e rescue StandardError => e raise Ffccmmx::Error, cause: e end |