CloudFlare Workers Error: The 'cache' field on 'RequestInitializerDict' is not implemented (axiom.flush)

Calling axiom.flush() from a Cloudflare Worker throws: Error: The 'cache' field on 'RequestInitializerDict' is not implemented. The stack trace points at fetchClient.ts in @axiomhq/js. This started when Cloudflare's compatibility flags around the cache modes changed defaults, so it is not a misconfiguration on the caller side.

The SDK's fetch client sent cache: 'no-cache' on ingestion requests, a cache mode Cloudflare Workers had not implemented. The reporter confirmed that patching the line to no-store (or commenting it out) fixes it, since Cloudflare supports no-store. Fixed upstream: @axiomhq/js version 1.3.1 switched the fetch client to no-store, so upgrading to 1.3.1 or later resolves it with no code changes.

Source: https://github.com/axiomhq/axiom-js/issues/242

Source: https://github.com/axiomhq/axiom-js/issues/242