synapse/api/errors.py
def cs_error(msg, code=Codes.UNKNOWN, **kwargs):
    """ Utility method for constructing an error response for client-server
    interactions.

    Args:
        msg (str): The error message.
        code (int): The error code.
        kwargs : Additional keys to add to the response.
    Returns:
        A dict representing the error response JSON.
    """
    err = {"error": msg, "errcode": code}
    for key, value in iteritems(kwargs):
        err[key] = value
    return err
 Utility method for constructing an error response for client-server
    interactions.

    Args:
        msg (str): The error message.
        code (int): The error code.
        kwargs : Additional keys to add to the response.
    Returns:
        A dict representing the error response JSON.
    
Utility method for constructing an error response for client-server
interactions.
Utility method for constructing an error response for client - server interactions .
def cs_error(msg, code=Codes.UNKNOWN, **kwargs):
    err = {"error": msg, "errcode": code}
    for key, value in iteritems(kwargs):
        err[key] = value
    return err
def cs_error ( msg , code = Codes . UNKNOWN , ** kwargs ) : err = { "error" : msg , "errcode" : code } for key , value in iteritems ( kwargs ) : err [ key ] = value return err
Utility method for constructing an error response for client-server
interactions.
Utility method for constructing an error response for client - server interactions .
""" Utility method for constructing an error response for client-server
    interactions.

    Args:
        msg (str): The error message.
        code (int): The error code.
        kwargs : Additional keys to add to the response.
    Returns:
        A dict representing the error response JSON.
    """
A dict representing the error response JSON.
A dict representing the error response JSON .
msg
The error message.
The error message .
code
The error code.
The error code .
kwargs 
Additional keys to add to the response.
Additional keys to add to the response .