Some of our API calls implement a custom error handling that catches all errors and throws a new Error with a custom message. This prevents the global axios interceptor from detecting 401 (Unauthorized) responses and automatically redirecting users to the login page.
Steps to recreate:
- Login
- Navigate to any profile
- Delete your dojo token
- Try adding a new strike
- Server sends a 401 back
Expected:
401 responses should bubble up to the global axios interceptor, which should then redirect the user to the login page.
Actual:
Unauthorized error code
We need to fix this for every api call that does that

Some of our API calls implement a custom error handling that catches all errors and throws a new Error with a custom message. This prevents the global axios interceptor from detecting 401 (Unauthorized) responses and automatically redirecting users to the login page.
Steps to recreate:
Expected:
401 responses should bubble up to the global axios interceptor, which should then redirect the user to the login page.
Actual:
Unauthorized error code
We need to fix this for every api call that does that