Added error alert for validation error
This commit is contained in:
1 parent
9beebd90a1
commit
4c84978e52
3 files changed
+22
-36
No files matched your search
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user