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)
|
user = new User(auth.user)
|
||||||
} catch (e) {
|
} 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
|
// retry with another number
|
||||||
await tg.close()
|
await tg.close()
|
||||||
continue
|
continue
|
||||||
|
|
|
@ -50,7 +50,7 @@ async function authorizeInDc(dc: number, base: BaseTelegramClient) {
|
||||||
|
|
||||||
user = new User(auth.user)
|
user = new User(auth.user)
|
||||||
} catch (e) {
|
} 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
|
// retry with another number
|
||||||
await tg.close()
|
await tg.close()
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in a new issue