This commit is contained in:
2026-04-13 17:21:22 +08:00
parent a913ce9548
commit cc8c9a6045

View File

@@ -126,12 +126,12 @@ async def handler(request: ws.WebSocketRequest):
except Request.ParamsError: err = Error.INVALID_PARAMS
except TypeError: err = Error.INVALID_REQUEST
except KeyError: err = Error.METHOD_NOT_FOUND
except Exception as e:
err = Error.INTERNAL_ERROR
exc = e
except ws.ConnectionClosed as e:
logger.critical('Going away', exc_info=e)
return
except Exception as e:
err = Error.INTERNAL_ERROR
exc = e
if err is not None: logger.error(err.message(), exc_info=exc)
if mid is not None: await connection.send_message(str(Response(mid, err or res)))