Spaces:
Sleeping
Sleeping
File size: 303 Bytes
0225ffc | 1 2 3 4 5 6 7 8 9 10 11 12 | from functools import wraps
import logging
def asyncHandler(fn):
@wraps(fn)
async def decorator(*args, **kwargs):
try:
return await fn(*args, **kwargs)
except Exception as e:
logging.exception("Unhandled exception")
raise
return decorator |