fix
This commit is contained in:
@@ -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)))
|
||||
|
||||
Reference in New Issue
Block a user