Skip to content

Commit

Permalink
add additional exceptions for middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
avollkopf committed Feb 1, 2025
1 parent 543b184 commit 3bb381f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cbpi/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = "4.5.0.a6"
__version__ = "4.5.0.a7"
__codename__ = "Cross Country"

6 changes: 5 additions & 1 deletion cbpi/craftbeerpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ async def error_middleware(request, handler):
return web.json_response(status=500, data={'error': str(ex)})
except Exception as ex:
return web.json_response(status=500, data={'error': str(ex)})

except web.GracefulExit:
return web.json_response(status=500, data={'error': "GracefulExit"})
except asyncio.exceptions.CancelledError:
return web.json_response(status=500, data={'error': "CancelledError"})

return web.json_response(status=500, data={'error': message})


Expand Down

0 comments on commit 3bb381f

Please sign in to comment.