class Mudfly::Response::HttpException
Public Instance Methods
on_complete(response)
click to toggle source
# File lib/mudfly/response/http_exception.rb, line 14 def on_complete(response) case response[:status].to_i when 400; raise Mudfly::Error::BadRequest.new(response[:body]) when 403; raise Mudfly::Error::Forbidden.new(response[:body]) when 500; raise Mudfly::Error::InternalServerError.new('Something gone wrong') when 503; raise Mudfly::Error::ServiceUnavailable.new('Impossible to handle the request') end end