Show correct err msg when verification code has expired
This commit is contained in:
parent
56bcf32b95
commit
6dc6501381
|
@ -109,6 +109,8 @@ export default function Verify() {
|
|||
} catch (e) {
|
||||
if (e?.status === 401) {
|
||||
setFieldError('ott', constants.INVALID_CODE);
|
||||
} else if (e?.status === 410) {
|
||||
setFieldError('ott', constants.EXPIRED_CODE);
|
||||
} else {
|
||||
setFieldError('ott', `${constants.UNKNOWN_ERROR} ${e.message}`);
|
||||
}
|
||||
|
|
|
@ -70,6 +70,7 @@ const englishConstants = {
|
|||
VERIFY: 'verify',
|
||||
UNKNOWN_ERROR: 'something went wrong, please try again',
|
||||
INVALID_CODE: 'invalid verification code',
|
||||
EXPIRED_CODE: 'your verification code has expired',
|
||||
SENDING: 'sending...',
|
||||
SENT: 'sent!',
|
||||
PASSWORD: 'password',
|
||||
|
|
Loading…
Reference in a new issue