aboutsummaryrefslogtreecommitdiff
path: root/gn_auth/errors/tracing.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2025-07-09 11:51:37 -0500
committerFrederick Muriuki Muriithi2025-07-09 11:57:25 -0500
commit1740ccbe30946aa6693a6a9ed8211a2ff7cfbf3d (patch)
treeaf5b89ba28a39cd859ae943e8882f39f5ae54069 /gn_auth/errors/tracing.py
parente7a89061cba689268daf4991038d9bec763a06d3 (diff)
downloadgn-auth-main.tar.gz
Improve error handling and reporting.HEADmain
- Refactor out common functionality into reusable utilities - Handle errors from the Authlib library/package - Handle 4xx errors generically.
Diffstat (limited to 'gn_auth/errors/tracing.py')
-rw-r--r--gn_auth/errors/tracing.py18
1 files changed, 0 insertions, 18 deletions
diff --git a/gn_auth/errors/tracing.py b/gn_auth/errors/tracing.py
deleted file mode 100644
index 25b544f..0000000
--- a/gn_auth/errors/tracing.py
+++ /dev/null
@@ -1,18 +0,0 @@
-"""Utilities for improving error tracing."""
-import logging
-import traceback
-
-from flask import request
-
-logger = logging.getLogger(__name__)
-
-
-def add_trace(exc: Exception, errobj: dict) -> dict:
- """Add the traceback to the error handling object."""
- logger.error("Endpoint: %s\n%s",
- request.url,
- traceback.format_exception(exc))
- return {
- **errobj,
- "error-trace": "".join(traceback.format_exception(exc))
- }