def error_response(msg: str = ""):
    """Define a error json response to send a client.

    :param msg: A message indicating that the request has errors.
    """
    _data_response = {
        u'valid': False,
        u'msg': msg
    }
    return _data_response