Who requested what a failed attempt left, the failure's reason or the
error: a hook of a step policy, for the step it acts on, or a rescue step,
for the step it rescues.
exportfunctiondescribe(abort: JourneyAbort): string { if (abort.reason === "wrong type") { return`${abort.key}, requested by ${who(abort.requester)}, has the wrong type`; } if ( abort.reason === "required data missing" && abort.missing.kind === "key" ) { return`${abort.missing.key} is missing for ${who(abort.missing.requester)}`; } if (abort.reason === "not a value") { returnabort.key === undefined ? `the data of ${abort.eventKind??"a reason"} is not a value` : `${abort.key} is not a value`; } if ( abort.reason === "step could not be built" && abort.source.kind === "adapter" ) { return`${abort.step} could not be built: ${abort.source.adapter} failed for ${abort.source.key}`; } if (abort.reason === "unexpected result") { return`${abort.step}: ${abort.message}`; } if (abort.reason === "hook failed" || abort.reason === "reporter failed") { return`${abort.reason}: ${abort.errorMessage}`; } returnabort.step === undefined ? abort.reason : `${abort.reason} during ${abort.step}`; }
Who requested what a failed attempt left, the failure's reason or the error: a hook of a step policy, for the step it acts on, or a rescue step, for the step it rescues.