A minimal reproduction for demonstrating how canceled long-poll promises are logged as errors during graceful shutdown in @camunda8/sdk
- Node.js v22 (as specified in the
package.json)
- Clone the repo
- Install dependencies (
npm install) - Update the Camunda connection placeholders in
reproduction.ts
Run the reproduction script:
npm run startThis will:
- Fetch and log the Camunda 8 topology
- Start a single-job worker of type
test-job - Wait 5 seconds to activate a job
- Trigger a graceful shutdown (
worker.stop()) - Wait 1 second to let the canceled long-poll promise surface the errors
When the worker shuts down gracefully, any in-flight activation requests should be canceled silently without logging errors.
Instead, the SDK logs two errors:
error: Error during job worker poll
error: Promise was canceled