Giter Site home page Giter Site logo

egecheckbot's People

Contributors

amanokh avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

egecheckbot's Issues

В случае ошибки API диалог с запросом результата остается висеть бесконечно

Шаги воспроизведения:

  1. Зарегистрировать нового пользователя для проверки при работающем API
  2. Нажать кнопку Получить результаты при не работающем API
  3. Диалог остается висеть без ответа

Ожидаемый результат:
После определенного таймаута, допустим 15 секунд, отображать сообщение о том, что API недоступно

Спасибо за бота, респект.

Логи:

ERROR:asyncio:Task exception was never retrieved                                                                                                                                                                                        │
│ future: <Task finished name='Task-74' coro=<Dispatcher._process_polling_updates() done, defined at /usr/local/lib/python3.11/site-packages/aiogram/dispatcher/dispatcher.py:407> exception=ContentTypeError(RequestInfo(url=URL('https: │
│ Traceback (most recent call last):                                                                                                                                                                                                      │
│   File "/usr/local/lib/python3.11/site-packages/aiogram/dispatcher/dispatcher.py", line 415, in _process_polling_updates                                                                                                                │
│     for responses in itertools.chain.from_iterable(await self.process_updates(updates, fast)):                                                                                                                                          │
│                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                            │
│   File "/usr/local/lib/python3.11/site-packages/aiogram/dispatcher/dispatcher.py", line 235, in process_updates                                                                                                                         │
│     return await asyncio.gather(*tasks)                                                                                                                                                                                                 │
│            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                 │
│   File "/usr/local/lib/python3.11/site-packages/aiogram/dispatcher/handler.py", line 117, in notify                                                                                                                                     │
│     response = await handler_obj.handler(*args, **partial_data)                                                                                                                                                                         │
│                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                         │
│   File "/usr/local/lib/python3.11/site-packages/aiogram/dispatcher/dispatcher.py", line 256, in process_update                                                                                                                          │
│     return await self.message_handlers.notify(update.message)                                                                                                                                                                           │
│            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                           │
│   File "/usr/local/lib/python3.11/site-packages/aiogram/dispatcher/handler.py", line 117, in notify                                                                                                                                     │
│     response = await handler_obj.handler(*args, **partial_data)                                                                                                                                                                         │
│                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                         │
│   File "/bot/main.py", line 298, in btn_results                                                                                                                                                                                         │
│     await bot_send_results(message.chat.id)                                                                                                                                                                                             │
│   File "/bot/main.py", line 46, in bot_send_results                                                                                                                                                                                     │
│     err_msg, response = await utils.handle_get_results_json(chat_id)                                                                                                                                                                    │
│                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                    │
│   File "/bot/utils.py", line 312, in handle_get_results_json                                                                                                                                                                            │
│     json = await response.json()                                                                                                                                                                                                        │
│            ^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                        │
│   File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 1104, in json                                                                                                                                           │
│     raise ContentTypeError(                                                                                                                                                                                                             │
│ aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/html', url=URL('https://checkege.rustest.ru/api/exam')  

API сейчас возвращает ошибку 500.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.