Skip to content

Commit

Permalink
Adicionando tipo de erro.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigoborgesmachado committed Dec 20, 2023
1 parent 0e0be21 commit 9aca552
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if (token) {
api.interceptors.response.use(
(response) => response,
(error) => {
if (error.response && error.response.status === 401) {
if (error.response && (error.response.status === 401 || error.response.status === 500) ) {
localStorage.setItem(Config.LOGADO, 0);
localStorage.setItem(Config.USUARIO, '');
localStorage.setItem(Config.TOKEN, '');
Expand Down

0 comments on commit 9aca552

Please sign in to comment.