Add logging to silent backend exception handlers (BE-JN-001) - #319
Open
Joe225208726 wants to merge 1 commit into
Open
Add logging to silent backend exception handlers (BE-JN-001)#319Joe225208726 wants to merge 1 commit into
Joe225208726 wants to merge 1 commit into
Conversation
Contributor
Preview EnvironmentA preview environment can be spun up on demand for this PR.
|
Contributor
CI: Backend API
One or more checks failed. View logs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds logging to seven backend exception handlers that previously recovered from failures without leaving any trace. Each handler now records the failure before recovering, so silent failures become diagnosable. Recovery behaviour is unchanged.
Type of Change
Affected Components
/backend-api/frontend/engine(collectors / policies)/security/infrastructure/.github/workflows/docsMotivation
Several broad exception handlers in the backend recovered from failures silently, with no log output, which made those failures impossible to diagnose. This adds visibility without changing how the code recovers. Task: BE-JN-001.
Changes:
Testing Done
Triggered a Google OAuth token exchange failure locally. The handler now emits "ERROR api Google OAuth token exchange failed" with a full traceback, where previously the same failure recovered silently with only a 302 redirect and no log entry. Backend builds and boots cleanly with the change. Before/after log screenshots below.
Security Considerations
No security impact. This change only adds log statements and does not touch auth logic, secrets, permissions, or data exposure. The log messages are static strings and do not include tokens, credentials, or user data.
Breaking Changes
Rollback Plan
Checklist
Screenshots