Improved alerts for error handling login

This commit is contained in:
Peter KW 2024-04-13 21:07:32 +02:00
parent 88c6757bd3
commit 6ca7f0d31f
2 changed files with 14 additions and 3 deletions

View file

@ -46,8 +46,15 @@ function LoginCheck(props: {
console.error("Token was undefined");
}
} else {
console.error("Token could not be fetched/No such user");
alert("Could not login, wrong username or password");
if (response.data === "500") {
console.error(response.message);
alert("No connection/Error");
} else {
console.error(
"Token could not be fetched/No such user" + response.message,
);
alert("Incorrect login information");
}
}
})
.catch((error) => {