-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Description
Is there a way that I can ignore one of the error statuses and return the normal route? We return partial data with a 403 when the user is requesting GQL with something in the graph they cannot access. I would like the page to still render as though there was no HTTP error.
const RouteConfig = createFarceRouter({
...
renderError: ({ error }) => {
switch (error.status) {
case 404:
case 500:
return <HttpErrorPage errorCode={error.status} />;
case 401:
throw new RedirectException('/login');
case 403:
// Do normal route rendering
default:
return null;
}
}
});
Many thanks
Metadata
Metadata
Assignees
Labels
No labels