class Busibe::Error::RaiseClientError
Public Instance Methods
on_complete(env)
click to toggle source
# File lib/busibe/error/raise_client_error.rb, line 6 def on_complete(env) status = env[:status].to_i body = env[:body] headers = env[:response_headers] case status when 400 raise Busibe::Error::BadRequest.new body, headers when 403 raise Busibe::Error::Forbidden.new body, headers when 413 raise Busibe::Error::RequestTooLarge.new body, headers end end