Abort with suitable error response

    Args:
        code (int): status code
        error (str): error symbol or flask.Response
        message (str): error message

def abort(code, error=None, message=None):
    """
    Abort with suitable error response

    Args:
        code (int): status code
        error (str): error symbol or flask.Response
        message (str): error message
    """
    if error is None:
        flask_abort(code)
    elif isinstance(error, Response):
        error.status_code = code
        flask_abort(code, response=error)
    else:
        body = {
            "status": code,
            "error": error,
            "message": message
        }
        flask_abort(code, response=export(body, code))