Skip to content

Unify frontend and backend exception handlers with consistent API#5189

Closed
DeborahOlaboye wants to merge 1 commit intoreflex-dev:mainfrom
DeborahOlaboye:fix/exception-handler-unification
Closed

Unify frontend and backend exception handlers with consistent API#5189
DeborahOlaboye wants to merge 1 commit intoreflex-dev:mainfrom
DeborahOlaboye:fix/exception-handler-unification

Conversation

@DeborahOlaboye
Copy link
Copy Markdown

All Submissions:

  • Have you followed the guidelines stated in CONTRIBUTING.md file?
  • Have you checked to ensure there aren't any other open Pull Requests for the desired changed?

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

New Feature Submission:

  • Does your submission pass the tests?
  • Have you linted your code locally prior to submission?

Changes To Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

After these steps, you're ready to open a pull request.

a. Give a descriptive title to your PR.
- Unify frontend and backend exception handlers with consistent API
b. Describe your changes.
This change addresses issue [#5168], which highlights inconsistencies in Reflex's current exception handling for the front end and back end.  
Previously, exception handlers had limited access to client state and inconsistent event chaining behavior between the frontend and backend.  
By unifying the exception handler API:
- The **frontend** now uses a standardized function that logs exceptions.
- The **backend** returns an `EventSpec` tied to client session state, enabling consistent and structured error handling.
c. Put `closes #XXXX` in your comment to auto-close the issue that your PR fixes (if such).
`Closes #5168`

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Apr 27, 2025

CodSpeed Performance Report

Merging #5189 will not alter performance

Comparing DeborahOlaboye:fix/exception-handler-unification (995097b) with main (ab01997)

Summary

✅ 12 untouched benchmarks

@DeborahOlaboye DeborahOlaboye closed this by deleting the head repository Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant