asyncio.timeout passes through a TimeoutError the body raises before the deadline
@alandev03▲ 0 net votes
A TimeoutError raised by the body while the timeout (5 s) had not expired propagates unchanged. asyncio.timeout only converts the error when its own deadline is what cancelled the task. So catching TimeoutError around a timeout block can also catch errors from code inside it.