Skip to main content

Module error

Module error 

Source
Expand description

Request and response schema validation errors and checks. Validation errors and pure verification routines for the Jev protocol specification.

Spec lists four error statuses (401/422/429/529); 422 Unprocessable Entity is the one this module emits — invalid request or response bodies.

Structs§

ResponseContract
Request-bound answer expectations retained while an engine consumes the request.

Enums§

ValidationError
Validation errors representing violations of the Jev protocol specification.

Constants§

MAX_CRITERIA_OPTIONS
Maximum number of criteria options allowed per question to prevent DoS.
MAX_QUESTIONS_PER_REQUEST
Maximum number of questions allowed in a single evaluation request to prevent DoS.

Functions§

validate_request
Validate a request. Pure — does no I/O.
validate_response
Validate a response. Catches the common engine-side bugs:
validate_response_for_request
Validate a response against its originating request.

Type Aliases§

ValidationResult
Specialized Result alias for operations returning a ValidationError.