Beispiel #1
0
def validation_errors(error):
    """
    Transform marshmallow validation errors to custom responses to maintain backward-compatibility.

    :param error: intercepted 422 http error
    :return: modified json error response
    """
    return validate_error(error)
Beispiel #2
0
def validation_errors(error):
    """
    Transform marshmallow validation errors to custom responses to maintain backward-compatibility.

    Arguments:
        error: intercepted 422 http error
    Returns:
        Modified error response
    """
    return validate_error(error)
Beispiel #3
0
def validation_errors(error) -> Callable:
    """
    Transform marshmallow validation errors to custom responses to maintain backward-compatibility.

    Arguments:
        error: intercepted http error message object
    Returns:
        f(): custom validated error message
    """
    return validate_error(error)