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.
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-routewhich kicks the user back to/routeif 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 toreturn await redirectWithErrorandthrow await redirectWithErrorbut neither seems to being the toast message back.