We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c99441d commit decb352Copy full SHA for decb352
src/Common/Api.ts
@@ -150,6 +150,9 @@ async function fetchAPI<K = object>(
150
})
151
} else {
152
handleLogout()
153
+ // Using this way to ensure that the user is redirected to the login page
154
+ // and the component has enough time to get unmounted otherwise the component re-renders
155
+ // and try to access some property of a variable and log exception to sentry
156
return await new Promise((resolve) => {
157
setTimeout(() => {
158
resolve({ code: 401, status: 'Unauthorized', result: [] })
0 commit comments