Add human friendly error codes

This commit is contained in:
Ray 2023-10-10 08:15:02 +00:00 committed by GitHub
parent d04147c0fe
commit 5aadd3793d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 1 deletions

View File

@ -49,7 +49,17 @@ export function Signin( props ) {
})
.catch( (code) => {
//console.log(code)
setErrorCode( code )
// setErrorCode( code )
switch(code) {
case"auth/invalid-email":
setErrorCode("The email address is invalid")
break
case"auth/invalid-login-credentials":
setErrorCode("Credentials supplied is not in our system")
break
default:
break
}
})
}