mirror of
https://github.com/reiyua/RaysMovieClub.git
synced 2026-01-20 15:37:47 +00:00
Add human friendly error codes
This commit is contained in:
parent
d04147c0fe
commit
5aadd3793d
1 changed files with 11 additions and 1 deletions
|
|
@ -49,7 +49,17 @@ export function Signin( props ) {
|
||||||
})
|
})
|
||||||
.catch( (code) => {
|
.catch( (code) => {
|
||||||
//console.log(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
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue