redactPayloadText
function redactPayloadText(params): string;Defined in: src/redact.ts:210
Run a caller’s redaction hook over one execution payload or error name.
Offered as the single string it is, not parsed: a payload is opaque text that only sometimes happens to be JSON, and a hook that wants to scrub inside it can parse and re-serialize it itself. It is handed the text in full, before the capture cap trims it, so that parse has something valid to work on.
Parameters
Section titled “Parameters”params
Section titled “params”Redaction parameters
Returns
Section titled “Returns”string
The text to inline; REDACTED when the hook redacted it
Example
Section titled “Example”redactPayloadText({ field: 'input', redact: ({ kind, value }) => (kind === 'payload' ? undefined : value), stateId: 'ProcessOrder', text: '{"token":"abc"}',}); // => '[redacted]'Remarks
Section titled “Remarks”path is <stateId>.<field>, or execution.cause for the failure cause of the
execution itself, which belongs to no single state.