Skip to content

Commit

Permalink
Correctly reject promise when wrong password on profile
Browse files Browse the repository at this point in the history
  • Loading branch information
paul1278 committed Jan 21, 2022
1 parent dd1866c commit 711dbf1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions frontend/src/boot/axios.js
Expand Up @@ -40,6 +40,11 @@ axiosInstance.interceptors.response.use(
return Promise.reject(error)
}

// 401 after wrong password on profile
if (error.response.status === 401 && originalRequest.url.endsWith('/users/me')) {
return Promise.reject(error)
}

// **** End of exceptions

// All other 401 calls
Expand Down

0 comments on commit 711dbf1

Please sign in to comment.