Exception: CleanModel::InvalidResponse
- Defined in:
- lib/clean_model/exceptions.rb
Instance Method Summary collapse
-
#initialize(response) ⇒ InvalidResponse
constructor
A new instance of InvalidResponse.
Constructor Details
#initialize(response) ⇒ InvalidResponse
Returns a new instance of InvalidResponse.
19 20 21 |
# File 'lib/clean_model/exceptions.rb', line 19 def initialize(response) super response.content_type == 'application/json' ? response.body : "#{response.code} - Unexpected error" end |