Skip to content

Commit

Permalink
Merge pull request #138 from Arquisoft/dev
Browse files Browse the repository at this point in the history
Arreglo unit test
  • Loading branch information
uo283055 authored Mar 14, 2024
2 parents 32a1ee4 + f715582 commit 3472a7e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion webapp/src/components/Login.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@ const Login = ({setLogged}) => {
setLogged();
setOpenSnackbar(true);
} catch (error) {
setError(error.response.data.error);
if (error.response) {
setError(error.response.data.error);
} else if (error.request) {
setError('No response from server. Please try again later.');
} else {
setError('An unexpected error occurred.');
}
}
};

Expand Down

0 comments on commit 3472a7e

Please sign in to comment.