When the token expires it responds with 401 to any request. Frontend sometimes can't handle the unexpected 401 response and crashes instead of redirecting to the login page.
To Reproduce
Steps to reproduce the behavior:
Go to available plugins page
Delete token
Refresh the page
Expected behavior
On 401 we should redirect to the login page before the front end tries to parse the response.
Describe the bug
When the token expires it responds with 401 to any request. Frontend sometimes can't handle the unexpected 401 response and crashes instead of redirecting to the login page.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
On 401 we should redirect to the login page before the front end tries to parse the response.