This is an automated email from the ASF dual-hosted git repository.
wave pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
The following commit(s) were added to refs/heads/main by this push:
new f2c69e8 No traceback on error html page (#578)
f2c69e8 is described below
commit f2c69e817cc57c8400e98bf76610b9f2ebfbba33
Author: Dave Fisher <[email protected]>
AuthorDate: Thu Jan 22 07:59:36 2026 -0800
No traceback on error html page (#578)
* No traceback on error html page
* #549 and #471 - implement structured logging when running not in debug
mode
* Notify users on authentication credentials change
Closes #547
* Add some e2e token tests
* Send email through the storage interface and add audit logging
* Switch to better condition for dev logs
---------
Co-authored-by: Alastair McFarlane <[email protected]>
Co-authored-by: Sean B. Palmer <[email protected]>
---
atr/server.py | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/atr/server.py b/atr/server.py
index 72eb4dd..a205455 100644
--- a/atr/server.py
+++ b/atr/server.py
@@ -747,17 +747,11 @@ def _register_routes(app: base.QuartApp) -> None:
# Add a global error handler to show helpful error messages with tracebacks
@app.errorhandler(Exception)
async def handle_any_exception(error: Exception) -> Any:
- import traceback
-
- # If the request was made to the API, return JSON
if quart.request.path.startswith("/api"):
status_code = getattr(error, "code", 500) if isinstance(error,
Exception) else 500
return quart.jsonify({"error": str(error)}), status_code
-
- # Required to give to the error.html template
- tb = traceback.format_exc()
log.exception("Unhandled exception")
- return await template.render("error.html", error=str(error),
traceback=tb, status_code=500), 500
+ return await template.render("error.html", error=str(error),
status_code=500), 500
@app.errorhandler(base.ASFQuartException)
async def handle_asfquart_exception(error: base.ASFQuartException) -> Any:
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]