def _authenticate_failed(self, e):
        if e.check(InvalidRequest):
            code = httpstatus.HTTP_STATUS_CODE_BAD_REQUEST[0]
            msg = e.getErrorMessage()
        elif e.check(UnauthorizedLogin):
            code = httpstatus.HTTP_STATUS_CODE_UNAUTHORIZED[0]
            msg = httpstatus.HTTP_STATUS_CODE_UNAUTHORIZED[1]
        else:
            e.printTraceback()
            code = httpstatus.HTTP_STATUS_CODE_INTERNAL_SERVER_ERROR[0]
            msg = httpstatus.HTTP_STATUS_CODE_INTERNAL_SERVER_ERROR[1]

        return Failure(HttpException(code, msg))
Method is called by deferred when the connection could not been
dataset/ETHPy150Open rapyuta/rce/rce-comm/rce/comm/server.py/RobotWebSocketProtocol._authenticate_failed