Method: Grape::Middleware::Error#call!
- Defined in:
- lib/grape/middleware/error.rb
#call!(env) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/grape/middleware/error.rb', line 33 def call!(env) @env = env begin error_response(catch(:error) do return @app.call(@env) end) rescue Exception => error # rubocop:disable Lint/RescueException handler = rescue_handler_for_base_only_class(error.class) || rescue_handler_for_class_or_its_ancestor(error.class) || rescue_handler_for_grape_exception(error.class) || rescue_handler_for_any_class(error.class) || raise run_rescue_handler(handler, error) end end |