We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 60340c2 commit b35044fCopy full SHA for b35044f
src/lib/utilities/handle-error.ts
@@ -38,7 +38,11 @@ export const handleError = (
38
}
39
40
if (isForbidden(error) && isBrowser) {
41
- window.location.assign(routeForLoginPage(error?.message));
+ toasts.push({
42
+ variant: 'error',
43
+ message: 'Forbidden!',
44
+ });
45
+ return;
46
47
48
if (isNetworkError(error)) {
@@ -65,7 +69,6 @@ export const handleUnauthorizedOrForbiddenError = (
65
69
66
70
67
71
68
- window.location.assign(routeForLoginPage(msg));
72
return;
73
74
};
0 commit comments