File size: 459 Bytes
9705b6c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
const getLoginError = (errorText: string) => {
const defaultError = 'com_auth_error_login';
if (!errorText) {
return defaultError;
}
if (errorText?.includes('429')) {
return 'com_auth_error_login_rl';
} else if (errorText?.includes('403')) {
return 'com_auth_error_login_ban';
} else if (errorText?.includes('500')) {
return 'com_auth_error_login_server';
} else {
return defaultError;
}
};
export default getLoginError;
|