(req_id, error)
Generate a Response object with a JSON-RPC error body. Used to
    raise top-level pre-defined errors that happen outside the
    controller.
Generate a Response object with a JSON-RPC error body. Used to
    raise top-level pre-defined errors that happen outside the
    controller.
Generate a Response object with a JSON - RPC error body . Used to raise top - level pre - defined errors that happen outside the controller .
def jsonrpc_error(req_id, error):
    """Generate a Response object with a JSON-RPC error body. Used to
    raise top-level pre-defined errors that happen outside the
    controller."""
    if error in _reserved_errors:
        err = _reserved_errors[error]
        return Response(body=json.dumps(dict(jsonrpc=JSONRPC_VERSION,
                                             id=req_id,
                                             error=err.as_dict())))
def jsonrpc_error ( req_id , error ) : if error in _reserved_errors : err = _reserved_errors [ error ] return Response ( body = json . dumps ( dict ( jsonrpc = JSONRPC_VERSION , id = req_id , error = err . as_dict ( ) ) ) )