Handle asyncio.exceptions.CancelledError in custom connector

Hello, RASA version: 3.0.8

I wrote a custom connector. If the response from the actions server takes more than 9 s then asyncio.exceptions.CancelledError is raised. Is it possible to extend this time when I await on_new_message? Also if the exception is catched and ok is returned from input channel, the rasa does not return response.

Here is the stack trace:

rasaserver-1  | Traceback (most recent call last):
rasaserver-1  |   File "/mybot/addons/my_connector.py", line 222, in handle_output
rasaserver-1  |     await on_new_message(user_msg)
rasaserver-1  |   File "/opt/venv/lib/python3.8/site-packages/rasa/core/channels/channel.py", line 89, in handler
rasaserver-1  |     await app.agent.handle_message(message)
rasaserver-1  |   File "/opt/venv/lib/python3.8/site-packages/rasa/core/agent.py", line 419, in handle_message
rasaserver-1  |     return await self.processor.handle_message(message)
rasaserver-1  |   File "/opt/venv/lib/python3.8/site-packages/rasa/core/processor.py", line 148, in handle_message
rasaserver-1  |     await self._run_prediction_loop(message.output_channel, tracker)
rasaserver-1  |   File "/opt/venv/lib/python3.8/site-packages/rasa/core/processor.py", line 768, in _run_prediction_loop
rasaserver-1  |     should_predict_another_action = await self._run_action(
rasaserver-1  |   File "/opt/venv/lib/python3.8/site-packages/rasa/core/processor.py", line 868, in _run_action
rasaserver-1  |     events = await action.run(
rasaserver-1  |   File "/opt/venv/lib/python3.8/site-packages/rasa/core/actions/action.py", line 722, in run
rasaserver-1  |     response = await self.action_endpoint.request(
rasaserver-1  |   File "/opt/venv/lib/python3.8/site-packages/rasa/utils/endpoints.py", line 165, in request
rasaserver-1  |     async with session.request(
rasaserver-1  |   File "/opt/venv/lib/python3.8/site-packages/aiohttp/client.py", line 1117, in __aenter__
rasaserver-1  |     self._resp = await self._coro
rasaserver-1  |   File "/opt/venv/lib/python3.8/site-packages/aiohttp/client.py", line 544, in _request
rasaserver-1  |     await resp.start(conn)
rasaserver-1  |   File "/opt/venv/lib/python3.8/site-packages/aiohttp/client_reqrep.py", line 890, in start
rasaserver-1  |     message, payload = await self._protocol.read()  # type: ignore
rasaserver-1  |   File "/opt/venv/lib/python3.8/site-packages/aiohttp/streams.py", line 604, in read
rasaserver-1  |     await self._waiter
rasaserver-1  | asyncio.exceptions.CancelledError

Anyone? :pray: :pray: :pray:

I know where is the problem. The client has a timeout set. Is it possible to return from webhook handler and run on_new_message in new thread.