Skip to content

Error catching in mutations prevents axios interceptor from handling 401 responses #299

Description

@zalexa19

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:

  1. Login
  2. Navigate to any profile
  3. Delete your dojo token
  4. Try adding a new strike
  5. 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

Image

Metadata

Metadata

Assignees

Labels

FEFrontend ticketbugSomething isn't working

Type

Fields

No fields configured for Bug.

Projects

Status
No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions