Skip to content

IdParamOptions

IdParamOptions = object

Defined in: src/adapters/hono.ts:36

Options for idParam and idQuery. All fields are optional.

Default validation is structuralsafeParse checks prefix and base32 form but does not verify any cryptographic tag. For IDs using a codec that satisfies IdVerifiableCodec (the Signed Timestamp codec or Wrapped key codec), set verify: true to also authenticate the tag.

optional onError?: (failure, c) => Response | Promise<Response>

Defined in: src/adapters/hono.ts:41

Called instead of throwing when provided. The hook owns the response entirely — the adapter neither throws nor writes a body.

IdParamFailure

Context

Response | Promise<Response>


optional status?: object

Defined in: src/adapters/hono.ts:46

Remap the default HTTP status for a failure reason without a full handler. e.g. { brand_mismatch: 400 } treats both failure kinds as 400.

optional brand_mismatch?: ContentfulStatusCode

optional malformed?: ContentfulStatusCode