inventorymgr/api/error.py
def handle_validation_error(error: ValidationError) -> Response:
    """Convert a ValidationError from parsing JSON input to a error response."""
    response = jsonify({"reason": "validation_failed", "errors": error.errors()})
    response.status_code = 400
    return cast(Response, response)
Convert a ValidationError from parsing JSON input to a error response.
Convert a ValidationError from parsing JSON input to a error response.
Convert a ValidationError from parsing JSON input to a error response .
def handle_validation_error(error: ValidationError) -> Response:
    response = jsonify({"reason": "validation_failed", "errors": error.errors()})
    response.status_code = 400
    return cast(Response, response)
def handle_validation_error ( error : ValidationError ) -> Response : response = jsonify ( { "reason" : "validation_failed" , "errors" : error . errors ( ) } ) response . status_code = 400 return cast ( Response , response )
Convert a ValidationError from parsing JSON input to a error response.
Convert a ValidationError from parsing JSON input to a error response .
"""Convert a ValidationError from parsing JSON input to a error response."""
error
ValidationError