mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-05-21 00:48:45 -05:00
Added check to error details
This commit is contained in:
@@ -78,7 +78,10 @@ const Login = () => {
|
||||
// validation errors
|
||||
createToast({
|
||||
variant: "info",
|
||||
body: error.details[0].message,
|
||||
body:
|
||||
error && error.details && error.details.length > 0
|
||||
? error.details[0].message
|
||||
: "Error validating data.",
|
||||
hasIcon: false,
|
||||
});
|
||||
} else if (error.response) {
|
||||
|
||||
@@ -95,7 +95,10 @@ const Register = () => {
|
||||
// validation errors
|
||||
createToast({
|
||||
variant: "info",
|
||||
body: error.details[0].message,
|
||||
body:
|
||||
error && error.details && error.details.length > 0
|
||||
? error.details[0].message
|
||||
: "Error validating data.",
|
||||
hasIcon: false,
|
||||
});
|
||||
} else if (error.response) {
|
||||
|
||||
Reference in New Issue
Block a user