DeadLetterBehaviorOptions
Αυτό το περιεχόμενο δεν είναι ακόμη διαθέσιμο στη γλώσσα σου.
Defined in: packages/pipeline-deadletter/src/interfaces/dead-letter-options.interface.ts:34
Per-handler (and constructor-default) options for DeadLetterBehavior.
Supplied per handler via
pipeline.wrap(options, [DeadLetterBehavior, { ... }]), shallow-merged over
the constructor defaults (handler keys win), except that ignoreErrors and
redactKeys set at both levels are combined.
Example
Section titled “Example”Fire-and-forget event capture
class UserCreatedHandler { @pipeline.wrap({ kind: 'event' }, [DeadLetterBehavior, { captureKinds: ['event'], rethrow: false, redactKeys: ['token'], }]) async handle(event: UserCreatedEvent) {}}Properties
Section titled “Properties”captureKinds?
Section titled “captureKinds?”
optionalcaptureKinds?:DeadLetterRequestKind[]
Defined in: packages/pipeline-deadletter/src/interfaces/dead-letter-options.interface.ts:58
Request kinds to capture. Default ['event']: a command’s or query’s
caller already receives the error. Example: ['command', 'event'] to also
keep failed commands.
ignoreErrors?
Section titled “ignoreErrors?”
optionalignoreErrors?: (Constructor<unknown> | ((…args) =>unknown))[] | ((error,context) =>boolean)
Defined in: packages/pipeline-deadletter/src/interfaces/dead-letter-options.interface.ts:65
Filter predicate or error types to ignore. Matching errors are re-thrown without being sent to the dead-letter transport. Useful for ignoring expected client validation errors (e.g. ZodValidationError).
includeStack?
Section titled “includeStack?”
optionalincludeStack?:boolean
Defined in: packages/pipeline-deadletter/src/interfaces/dead-letter-options.interface.ts:51
Include the error stack trace in the record. Default true.
Set false to keep records lean or avoid leaking internals downstream.
metadata?
Section titled “metadata?”
optionalmetadata?:DeadLetterMetadataFactory
Defined in: packages/pipeline-deadletter/src/interfaces/dead-letter-options.interface.ts:70
Produce extra metadata to merge into the dead-letter record.
redact?
Section titled “redact?”
optionalredact?: (payload) =>unknown
Defined in: packages/pipeline-deadletter/src/interfaces/dead-letter-options.interface.ts:76
Custom redactor function for the captured request payload. When supplied, takes precedence over redactKeys.
Parameters
Section titled “Parameters”payload
Section titled “payload”unknown
Returns
Section titled “Returns”unknown
redactKeys?
Section titled “redactKeys?”
optionalredactKeys?:string[]
Defined in: packages/pipeline-deadletter/src/interfaces/dead-letter-options.interface.ts:82
Field names to mask with [REDACTED] in the captured request payload.
Case-insensitive matching. Merged on top of DEFAULT_REDACT_KEYS.
rethrow?
Section titled “rethrow?”
optionalrethrow?:boolean
Defined in: packages/pipeline-deadletter/src/interfaces/dead-letter-options.interface.ts:45
Whether to re-throw the original error after dead-lettering.
true(default) — propagate after the capture decision; the caller sees the failure (HTTP 5xx, command rejection, …). Use for commands/queries.false— on an event handler only, swallow the error when it is captured and the transport delivers it; the pipeline then resolves toundefinedand the swallow is logged aterrorlevel with the record id. On a command or query handler it is a contract diagnostic and is ignored.