Skip to content

Commit

Permalink
fix: refreshes work properly now
Browse files Browse the repository at this point in the history
  • Loading branch information
Sampiiiii committed Nov 19, 2024
1 parent 457823d commit 9f229cb
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions apps/forge/src/api/axiosInstance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,15 +160,6 @@ class AxiosAuthInstance {
return Promise.reject(error);
}

// Don't intercept /users/me 401s
if (
error.config?.url?.includes("/users/me") &&
error.response?.status === 401 &&
error.response?.data?.message === "Unauthorized"
) {
return Promise.reject(error);
}

// Handle other 401s with refresh attempt
if (error instanceof AxiosError && error.response?.status === 401) {
try {
Expand Down

0 comments on commit 9f229cb

Please sign in to comment.