Skip to main content

RequestIdPolicy

Type Alias RequestIdPolicy 

Source
pub type RequestIdPolicy = RequestIdMode;
Expand description

Compatibility alias for naming request ID validation policy.

Aliased Type§

pub enum RequestIdPolicy {
    Permissive,
    Strict,
}

Variants§

§

Permissive

Propagate valid UUID v4 IDs and replace malformed incoming IDs.

This mode is useful in development and at integration boundaries where clients may still send legacy IDs. A malformed inbound value is not exposed to handlers; it is replaced with a generated ID before the request reaches the inner service.

§

Strict

Propagate valid UUID v4 IDs and reject malformed incoming IDs.

A malformed inbound value returns 400 Bad Request with an invalid_request_id JSON error body. The rejection response still receives a generated request ID in the configured response header.