Skip to content

Double redirect results in no toast message #42

@MattyBalaam

Description

@MattyBalaam

After migrating to using toast middleware, we have a regression where we have some access controls in our loaders and redirect to parent routes if no access is allowed.

Our tests have picked up an edge case where a direct url is used to a deep page /route/sub-route which kicks the user back to /route if they don’t have access for that page either and immediately redirected for a second time to / then no toast is displayed.

Our code was using return redirectWithError, I have also tried to change to return await redirectWithError and throw await redirectWithError but neither seems to being the toast message back.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions