We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2e4ff75 commit c381af9Copy full SHA for c381af9
2 files changed
css-reports/app.py
@@ -18,9 +18,9 @@ def hello():
18
19
20
@app.errorhandler(404)
21
-def page_not_found(e: Exception | int):
+def page_not_found(exception: Exception | int):
22
"""Handle 404 errors by redirecting to the main website."""
23
- print(e)
+ print(exception)
24
return redirect("https://cssbham.com", code=302)
25
26
@@ -93,8 +93,8 @@ async def fetch_customisation_report():
93
94
# Return the file as a response
95
return send_file(csv_file_path, as_attachment=True)
96
- except Exception as e:
97
- return jsonify({"error": str(e)}), 500
+ except Exception as unknown_error:
+ return jsonify({"error": str(unknown_error)}), 500
98
finally:
99
# Clean up the generated file
100
if csv_file_path and os.path.exists(csv_file_path):
0 commit comments