Code style

This commit is contained in:
Sami Samhuri 2025-06-28 07:37:22 -04:00
parent 585cd29a7d
commit f35dc1e9d6
No known key found for this signature in database

View file

@ -56,16 +56,14 @@ module GrapeLogging
# Catch error
error = catch(:error) do
begin
@app_response = @app.call(@env)
rescue => e
# Log as 500 + message
after(e.respond_to?(:status) ? e.status : 500, e.message)
# Re-raise exception
raise e
end
@app_response = @app.call(@env)
nil
rescue StandardError => e
# Log as 500 + message
after(e.respond_to?(:status) ? e.status : 500, e.message)
# Re-raise exception
raise e
end
# Get status & response from app_response