Exception: CleanModel::InvalidResponse

Inherits:
Error
  • Object
show all
Defined in:
lib/clean_model/exceptions.rb

Instance Method Summary collapse

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