IdParamOptions
IdParamOptions =
object
Defined in: src/adapters/fastify.ts:36
Options for idParam and idQuery. All fields are optional.
Default validation is structural — safeParse 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.
Properties
Section titled “Properties”onError?
Section titled “onError?”
optionalonError?: (failure,request,reply) =>void|Promise<void>
Defined in: src/adapters/fastify.ts:44
Called when ID validation fails. If the hook sends a response (i.e. reply.sent is
true after the hook resolves), the adapter takes no further action. If the hook
returns without sending a response, the adapter falls back to its default error
behavior — throwing IdParamError — so the route handler never runs with an
invalid or missing ID.
Parameters
Section titled “Parameters”failure
Section titled “failure”request
Section titled “request”FastifyRequest
FastifyReply
Returns
Section titled “Returns”void | Promise<void>
status?
Section titled “status?”
optionalstatus?:object
Defined in: src/adapters/fastify.ts:53
Remap the default HTTP status for a failure reason without a full handler.
e.g. { brand_mismatch: 400 } treats both failure kinds as 400.
brand_mismatch?
Section titled “brand_mismatch?”
optionalbrand_mismatch?:number
malformed?
Section titled “malformed?”
optionalmalformed?:number