Auth: Human-readable error messages (#1516)
This commit is contained in:
parent
7e8bf8addf
commit
b3e96a51c7
@ -9,10 +9,11 @@ import {
|
|||||||
import { DEBUG } from '../../../config';
|
import { DEBUG } from '../../../config';
|
||||||
|
|
||||||
const ApiErrors: { [k: string]: string } = {
|
const ApiErrors: { [k: string]: string } = {
|
||||||
PHONE_NUMBER_INVALID: 'PHONE_NUMBER_INVALID',
|
PHONE_NUMBER_INVALID: 'Invalid phone number.',
|
||||||
PHONE_CODE_INVALID: 'PHONE_CODE_INVALID',
|
PHONE_CODE_INVALID: 'Invalid code.',
|
||||||
PASSWORD_HASH_INVALID: 'PASSWORD_HASH_INVALID',
|
PASSWORD_HASH_INVALID: 'Incorrect password.',
|
||||||
PHONE_PASSWORD_FLOOD: 'You have tried logging in too many times',
|
PHONE_PASSWORD_FLOOD: 'Limit exceeded. Please try again later.',
|
||||||
|
PHONE_NUMBER_BANNED: 'This phone number is banned.',
|
||||||
};
|
};
|
||||||
|
|
||||||
const authController: {
|
const authController: {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user