def error400(request):
    def always_fail(value):
        raise ValidationError('something went wrong', status_code=400)
    argmap = {'text': fields.Str(validate=always_fail)}
    try:
        return parser.parse(argmap, request)
    except __HOLE__ as err:
        return json_response(err.messages, status=err.status_code)
dataset/ETHPy150Open sloria/webargs/tests/apps/django_app/echo/views.py/error400