context.cancel is different — it allows you to explicitly cancel the current workflow run.
- It is labeled as canceled (not failed).
- The configured
failureFunctionis not triggered. - No entries are sent to the dead-letter queue (DLQ).
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
context.cancel is different — it allows you to explicitly cancel the current workflow run.
export const { POST } = serve<{ topic: string }>(async (context) => {
const payload = context.requestPayload
const result = await context.run("check if canceled", () => { ... });
if (result.cancel) {
await context.cancel() // cancel the workflow run
}
})
failureFunction is not triggered.Was this page helpful?