Class: AirbrakeAPI::Middleware::RaiseServerError

Inherits:
Faraday::Response::Middleware
  • Object
show all
Defined in:
lib/airbrake-api/middleware/raise_server_error.rb

Instance Method Summary collapse

Instance Method Details

#on_complete(env) ⇒ Object


7
8
9
10
11
12
# File 'lib/airbrake-api/middleware/raise_server_error.rb', line 7

def on_complete(env)
  case env[:status].to_i
  when 403
    raise AirbrakeError.new('SSL should be enabled - use AirbrakeAPI.secure = true in configuration')
  end
end