You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
The renderError, &c. stuff is just syntactic sugar around passing in a single render method that's the result of createRender. You can specify just render and do whatever you want, in principle. That said, in this case, you probably need to configure your network layer to not drop the entire response as an error. See facebook/relay#1913.
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.
Many thanks
The text was updated successfully, but these errors were encountered: