Method: ApiValve::Middleware::ErrorHandling#call

Defined in:
lib/api_valve/middleware/error_handling.rb

#call(env) ⇒ Object



7
8
9
10
11
12
# File 'lib/api_valve/middleware/error_handling.rb', line 7

def call(env)
  @app.call(env)
rescue Exception => e # rubocop:disable Lint/RescueException
  log_error e
  render_error(e).to_a
end