Skip to content

feat: add global error boundary and centralized exception handling#802

Open
nancysangani wants to merge 1 commit into
komalharshita:mainfrom
nancysangani:feat/global-error-boundary
Open

feat: add global error boundary and centralized exception handling#802
nancysangani wants to merge 1 commit into
komalharshita:mainfrom
nancysangani:feat/global-error-boundary

Conversation

@nancysangani
Copy link
Copy Markdown

Closes #793

Implements a centralized error handling mechanism across the Flask application.

Changes:

  • errors/handlers.py — all HTTP error handlers (400, 403, 404, 405, 429, 500) + unhandled exception catch-all, with HTML/JSON content negotiation for API routes
  • utils/error_logger.py — secure server-side logging with correlation IDs; no stack traces ever reach the client
  • app.py — replaced inline handlers with register_error_handlers(app)
  • templates/400.html, templates/429.html — missing error pages added
  • tests/test_error_handling.py — 30 tests covering all handlers, JSON envelope shape, security header preservation, and unhandled exception catch

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 8, 2026

@nancysangani is attempting to deploy a commit to the komalsony234-1530's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for submitting your first pull request to DevPath.

Before review:

  • Complete the PR template fully
  • Ensure all tests pass
  • Link your PR to an issue
  • Keep changes scoped to the issue

A maintainer will review your contribution soon.

@nancysangani
Copy link
Copy Markdown
Author

Hi @komalharshita, Please review the PR when you get a chance. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CRITICAL: Implement Global Error Boundary and Exception Handling Mechanism

1 participant