This is an automated email from the ASF dual-hosted git repository. wave pushed a commit to branch no-traceback-on-error-html in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
commit 622fe3b117936da827b18d306ff34f25a74e80c8 Author: Dave Fisher <[email protected]> AuthorDate: Wed Jan 21 20:27:08 2026 -0800 No traceback on error html page --- atr/server.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/atr/server.py b/atr/server.py index 380a7f2..528fc16 100644 --- a/atr/server.py +++ b/atr/server.py @@ -676,17 +676,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]
