test(e2e): correctly handle PHONE_NUMBER_FLOOD
This commit is contained in:
parent
78285d4815
commit
bbb8d4b908
2 changed files with 2 additions and 2 deletions
|
@ -49,7 +49,7 @@ async function authorizeInDc(dc: number, base: BaseTelegramClient) {
|
|||
|
||||
user = new User(auth.user)
|
||||
} catch (e) {
|
||||
if (tl.RpcError.is(e, 'SESSION_PASSWORD_NEEDED') || tl.RpcError.is('PHONE_NUMBER_FLOOD')) {
|
||||
if (tl.RpcError.is(e, 'SESSION_PASSWORD_NEEDED') || tl.RpcError.is(e, 'PHONE_NUMBER_FLOOD')) {
|
||||
// retry with another number
|
||||
await tg.close()
|
||||
continue
|
||||
|
|
|
@ -50,7 +50,7 @@ async function authorizeInDc(dc: number, base: BaseTelegramClient) {
|
|||
|
||||
user = new User(auth.user)
|
||||
} catch (e) {
|
||||
if (tl.RpcError.is(e, 'SESSION_PASSWORD_NEEDED') || tl.RpcError.is('PHONE_NUMBER_FLOOD')) {
|
||||
if (tl.RpcError.is(e, 'SESSION_PASSWORD_NEEDED') || tl.RpcError.is(e, 'PHONE_NUMBER_FLOOD')) {
|
||||
// retry with another number
|
||||
await tg.close()
|
||||
continue
|
||||
|
|
Loading…
Reference in a new issue