Rails add suppressed errors to rack envs, but i didnt found suppressed errors from grape in rack env
So we wrote monkeypatch grape to access suppressed errors by Grape::Middleware::Error:
# grape 1.8.0
module GrapeMiddlewareErrorPatch
def run_rescue_handler(handler, e)
@env['grape.exception'] = e
super(handler, e)
end
end
if defined?(Grape::Middleware::Error)
Grape::Middleware::Error.prepend(GrapeMiddlewareErrorPatch)
end
So may be add this line to gem?)