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,17 +56,15 @@ module GrapeLogging
# Catch error # Catch error
error = catch(:error) do error = catch(:error) do
begin
@app_response = @app.call(@env) @app_response = @app.call(@env)
rescue => e nil
rescue StandardError => e
# Log as 500 + message # Log as 500 + message
after(e.respond_to?(:status) ? e.status : 500, e.message) after(e.respond_to?(:status) ? e.status : 500, e.message)
# Re-raise exception # Re-raise exception
raise e raise e
end end
nil
end
# Get status & response from app_response # Get status & response from app_response
# when no error occurs. # when no error occurs.