Closed
Description
I followed an example https://docs.sentry.io/platforms/python/aiohttp/ and first thing I did
async def hello(request):
print(1/0)
It's work fine and I got this Sentry Issue. But, when you try
async def hello(request):
raise web_exceptions.HTTPInternalServerError # any aiohttp exception
you won't get any Sentry Issue.
Is the only way to catch errors to use middleware?
async def errors_handler(request, handler):
try:
response = await handler(request)
except web.HTTPException as e:
capture_exception(e)
Metadata
Metadata
Assignees
Labels
No labels