Added error alert for validation error

This commit is contained in:
Alex Holliday committed 2024-06-10 11:58:48 -07:00
1 parent 9beebd90a1
commit 4c84978e52
3 files changed
+22 -36

No files matched your search

+1 -1
View File
@@ -64,7 +64,7 @@ const Login = () => {
if (error.name === "ValidationError") {
// TODO Handle validation errors
console.log(error.details);
alert("Invalid input");
alert(error);
} else if (error.response) {
// TODO handle dispatch errors
alert(error.response.msg);
+1 -1
View File
@@ -87,7 +87,7 @@ const Register = () => {
if (error.name === "ValidationError") {
// TODO Handle validation errors
console.log(error);
alert("Invalid input");
alert(error);
} else if (error.response) {
// TODO handle dispatch errors
alert(error.response.msg);