Remove global exception

Signed-off-by: Yasir Aris M <git@yasir.id>
This commit is contained in:
Yasir Aris M 2025-01-13 21:14:52 +07:00 committed by GitHub
parent 284395d4f5
commit 1c8571b87a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -661,7 +661,7 @@ async def update_restart(_, ctx: Message, strings):
os.execvp(sys.executable, [sys.executable, "-m", "misskaty"])
@app.on_error(errors=(Exception, FloodWait, RPCError, SlowmodeWait))
@app.on_error(errors=(FloodWait, RPCError, SlowmodeWait))
async def error_handlers(_: "Client", __: "Update", error: "Exception") -> None:
if isinstance(error, (FloodWait, SlowmodeWait)):
await asyncio.sleep(error.value)