Skip to content

IdParamOptions

IdParamOptions = object

Defined in: src/adapters/nestjs.ts:26

Options for ParseIdPipe. All fields are optional.

onError constraint: NestJS transform() receives only value and ArgumentMetadata — there is no HTTP context object. The onError hook must throw (or re-throw); it cannot write a response inline the way Hono/Express hooks can.

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), pass verify: true via IdParamVerifyOptions to also authenticate the tag.

optional onError?: (failure) => never

Defined in: src/adapters/nestjs.ts:31

Called instead of throwing when provided. The hook must throw or re-throw — it cannot return a response because PipeTransform.transform has no HTTP context.

IdParamFailure

never


optional status?: object

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

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?: number

optional malformed?: number