Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Аккуратнее вылетать с ошибкой, когда введен неверный номер телефона #13

Open
igoose1 opened this issue Aug 9, 2023 · 0 comments

Comments

@igoose1
Copy link
Owner

igoose1 commented Aug 9, 2023

ゴゴゴゴゴゴゴゴゴゴゴゴゴゴゴゴゴゴゴゴゴゴゴゴ, [8/9/23 5:31 PM]
Крашится если случайно ошибиться в телефоне

ゴゴゴゴゴゴゴゴゴゴゴゴゴゴゴゴゴゴゴゴゴゴゴゴ, [8/9/23 5:31 PM]

Unhandled exception; stopping loop: 'Task exception was never retrieved'
Traceback (most recent call last):
  File "/home/vitaliidmitriev/wedne1/venv/lib/python3.10/site-packages/aiorun.py", line 219, in new_coro
    await coro
  File "/home/vitaliidmitriev/wedne1/venv/lib/python3.10/site-packages/wedne/client/__main__.py", line 22, in main
    await telegram_tower_builder.start()
  File "/home/vitaliidmitriev/wedne1/venv/lib/python3.10/site-packages/wedne/client/telegram.py", line 62, in start
    await self.client.start()  # type: ignore
  File "/home/vitaliidmitriev/wedne1/venv/lib/python3.10/site-packages/telethon/client/auth.py", line 184, in _start
    await self.send_code_request(phone, force_sms=force_sms)
  File "/home/vitaliidmitriev/wedne1/venv/lib/python3.10/site-packages/telethon/client/auth.py", line 434, in send_code_request
    result = await self(functions.auth.SendCodeRequest(
  File "/home/vitaliidmitriev/wedne1/venv/lib/python3.10/site-packages/telethon/client/users.py", line 30, in __call__
    return await self._call(self._sender, request, ordered=ordered)
  File "/home/vitaliidmitriev/wedne1/venv/lib/python3.10/site-packages/telethon/client/users.py", line 87, in _call
    result = await future
telethon.errors.rpcerrorlist.PhoneNumberInvalidError: The phone number is invalid (caused by SendCodeRequest)
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/vitaliidmitriev/wedne1/venv/lib/python3.10/site-packages/wedne/client/__main__.py", line 51, in <module>
    fire.Fire(sync_main, name="wedne.client")
  File "/home/vitaliidmitriev/wedne1/venv/lib/python3.10/site-packages/fire/core.py", line 141, in Fire
    component_trace = _Fire(component, args, parsed_flag_args, context, name)
  File "/home/vitaliidmitriev/wedne1/venv/lib/python3.10/site-packages/fire/core.py", line 475, in _Fire
    component, remaining_args = _CallAndUpdateTrace(
  File "/home/vitaliidmitriev/wedne1/venv/lib/python3.10/site-packages/fire/core.py", line 691, in _CallAndUpdateTrace
    component = fn(*varargs, **kwargs)
  File "/home/vitaliidmitriev/wedne1/venv/lib/python3.10/site-packages/wedne/client/__main__.py", line 44, in sync_main
    aiorun.run(main(endpoint, chat_id), stop_on_unhandled_errors=True)
  File "/home/vitaliidmitriev/wedne1/venv/lib/python3.10/site-packages/aiorun.py", line 371, in run
    raise pending_exception_to_raise
  File "/home/vitaliidmitriev/wedne1/venv/lib/python3.10/site-packages/aiorun.py", line 219, in new_coro
    await coro
  File "/home/vitaliidmitriev/wedne1/venv/lib/python3.10/site-packages/wedne/client/__main__.py", line 22, in main
    await telegram_tower_builder.start()
  File "/home/vitaliidmitriev/wedne1/venv/lib/python3.10/site-packages/wedne/client/telegram.py", line 62, in start
    await self.client.start()  # type: ignore
  File "/home/vitaliidmitriev/wedne1/venv/lib/python3.10/site-packages/telethon/client/auth.py", line 184, in _start
    await self.send_code_request(phone, force_sms=force_sms)
  File "/home/vitaliidmitriev/wedne1/venv/lib/python3.10/site-packages/telethon/client/auth.py", line 434, in send_code_request
    result = await self(functions.auth.SendCodeRequest(
  File "/home/vitaliidmitriev/wedne1/venv/lib/python3.10/site-packages/telethon/client/users.py", line 30, in __call__
    return await self._call(self._sender, request, ordered=ordered)
  File "/home/vitaliidmitriev/wedne1/venv/lib/python3.10/site-packages/telethon/client/users.py", line 87, in _call
    result = await future
telethon.errors.rpcerrorlist.PhoneNumberInvalidError: The phone number is invalid (caused by SendCodeRequest)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant