Add human friendly error codes
This commit is contained in:
parent
d04147c0fe
commit
5aadd3793d
|
@ -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 New Issue