This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch sbp
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
The following commit(s) were added to refs/heads/sbp by this push:
new 933c601 Add a test route to raise an error, and log unhandled
exceptions in JSON
933c601 is described below
commit 933c601a1a9afca40cc1fbba38c21297e8c65430
Author: Sean B. Palmer <[email protected]>
AuthorDate: Mon Feb 2 16:41:15 2026 +0000
Add a test route to raise an error, and log unhandled exceptions in JSON
---
atr/admin/__init__.py | 5 +++++
atr/loggers.py | 1 +
2 files changed, 6 insertions(+)
diff --git a/atr/admin/__init__.py b/atr/admin/__init__.py
index dd1728c..fc4bafa 100644
--- a/atr/admin/__init__.py
+++ b/atr/admin/__init__.py
@@ -576,6 +576,11 @@ async def logs(session: web.Committer) ->
web.QuartResponse:
return web.TextResponse("\n".join(recent_logs))
[email protected]("/raise-error")
+async def raise_error(session: web.Committer) -> web.QuartResponse:
+ raise RuntimeError("Admin test route deliberately raised an unhandled
error")
+
+
@admin.get("/ongoing-tasks/<project_name>/<version_name>/<revision>")
async def ongoing_tasks_get(
session: web.Committer, project_name: str, version_name: str, revision: str
diff --git a/atr/loggers.py b/atr/loggers.py
index 6366d73..dba4260 100644
--- a/atr/loggers.py
+++ b/atr/loggers.py
@@ -49,6 +49,7 @@ def create_json_formatter(
processors=[
structlog.stdlib.ProcessorFormatter.remove_processors_meta,
_parse_json_event,
+ structlog.processors.format_exc_info,
structlog.processors.JSONRenderer(),
],
foreign_pre_chain=list(shared_processors),
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]