-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Describe the Features
Currently if the backend sends a delta that the frontend cannot understand, it (hopefully) throws dispatch[substate] is not a function in the browser, which is not useful for end users and if the user is not checking the browser console, it makes the app appear broken after the hydrate event. Ideally the backend should be made aware of this error as python devs often check their terminal for error logs before the browser console
Instead, reflex should internally catch this error in the socket.on("event") handler and raise an error with an actionable message that includes the failed state name and potential remediation steps (rebuild frontend, check api_url, etc). The error should be fatal, because we never want to run an app with a mismatched frontend and backend as that indicates some deployment error that we want to catch during testing.
- What is the purpose of the feature?
More actionable error when frontend/backend have mismatched states.