Skip to content

Need a better error path when backend sends unprocessable delta #6019

@masenf

Description

@masenf

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestA feature you wanted added to reflex

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions