You can't cancel a JavaScript promise (except sometimes you can) (inngest.com)
The article explains why JavaScript promises can’t generally be cancelled mid-flight, discusses the limits of using exceptions for “interrupts,” and contrasts that with generator-style interruption. It then shows a workaround used by the Inngest TypeScript SDK: returning a promise that never resolves so execution halts without throwing or needing .cancel(). The piece ties the technique to control-flow needs in serverless workflows with strict timeouts, where step results are memoized and the workflow is re-invoked to continue from the last completed step.
April 07, 2026 14:15
Source: Hacker News