Skip to content

Add validator error handling to generate_vumark_instance #2942

@adamtheturtle

Description

@adamtheturtle

The try/except ValidatorError block was removed from generate_vumark_instance in both the requests mock server and Flask server because the branches were uncovered by tests.

Once tests exist that exercise invalid requests to POST /targets/{target_id}/instances, the error handling should be added back:

try:
    run_services_validators(
        request_headers=request.headers,
        request_body=_body_bytes(request=request),
        request_method=request.method or "",
        request_path=request.path_url,
        databases=self._target_manager.databases,
    )
except ValidatorError as exc:
    return exc.status_code, exc.headers, exc.response_text

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions