Skip to content

PolicyReject

Defined in: src/core/protocol.ts:165

Reject the request with a structured error.

Equivalent to throw new GatewayError(...) in HTTP middleware, or ext_proc ImmediateResponse with an error status code.

action: "reject"

Defined in: src/core/protocol.ts:166


code: string

Defined in: src/core/protocol.ts:170

Machine-readable error code (e.g. "rate_limited", "unauthorized").


optional headers: Record<string, string>

Defined in: src/core/protocol.ts:174

Additional headers to include on the error response.


message: string

Defined in: src/core/protocol.ts:172

Human-readable error message.


status: number

Defined in: src/core/protocol.ts:168

HTTP status code (or gRPC status equivalent).