update websocket exception caught in api_ws

This commit is contained in:
Timothy Pogue
2022-10-08 18:39:33 -06:00
parent f9b3b0ef77
commit 85edcaaad5
2 changed files with 3 additions and 3 deletions

View File

@@ -134,13 +134,13 @@ async def message_endpoint(
except (
WebSocketDisconnect,
websockets.exceptions.ConnectionClosed
websockets.exceptions.WebSocketException
):
# Handle client disconnects
logger.info(f"Consumer disconnected - {channel}")
except Exception as e:
logger.info(f"Consumer connection failed - {channel}")
logger.exception(e)
logger.debug(e, exc_info=e)
# Handle cases like -
# RuntimeError('Cannot call "send" once a closed message has been sent')
finally: