Repository navigation
fix(cloudflare): register container outbound interception with the native Fetcher - #2062
Merged
BlankParticle merged 2 commits intoOct 6, 2026
Conversation
…tive Fetcher
interceptOutboundHttp and interceptAllOutboundHttp converted the binding
with toCloudflareFetcher into a plain { fetch, connect } object, which
workerd rejects ("parameter 2 is not of type 'Fetcher'"), and returned the
rejected promise unawaited as the Effect's value. Pass binding.raw and
await the call so a failure surfaces.
Fixes alchemy-run#2061
Contributor
|
Install the packages built from this commit: alchemypnpm install https://pkg.alchemy.run/alchemy/pr:2062:7da3561@alchemy.run (6)pnpm install https://pkg.alchemy.run/@alchemy.run/better-auth/pr:2062:7da3561pnpm install https://pkg.alchemy.run/@alchemy.run/cloudflare-runtime/pr:2062:7da3561pnpm install https://pkg.alchemy.run/@alchemy.run/frontend-frameworks/pr:2062:7da3561pnpm install https://pkg.alchemy.run/@alchemy.run/node-utils/pr:2062:7da3561pnpm install https://pkg.alchemy.run/@alchemy.run/floci/pr:2062:7da3561pnpm install https://pkg.alchemy.run/@alchemy.run/pkg/pr:2062:7da3561@distilled.cloud (16)pnpm install https://pkg.alchemy.run/@distilled.cloud/core/pr:2062:7da3561pnpm install https://pkg.alchemy.run/@distilled.cloud/acme/pr:2062:7da3561pnpm install https://pkg.alchemy.run/@distilled.cloud/aws/pr:2062:7da3561pnpm install https://pkg.alchemy.run/@distilled.cloud/axiom/pr:2062:7da3561pnpm install https://pkg.alchemy.run/@distilled.cloud/cloudflare/pr:2062:7da3561pnpm install https://pkg.alchemy.run/@distilled.cloud/doppler/pr:2062:7da3561pnpm install https://pkg.alchemy.run/@distilled.cloud/fly-io/pr:2062:7da3561pnpm install https://pkg.alchemy.run/@distilled.cloud/github/pr:2062:7da3561pnpm install https://pkg.alchemy.run/@distilled.cloud/hetzner/pr:2062:7da3561pnpm install https://pkg.alchemy.run/@distilled.cloud/infisical/pr:2062:7da3561pnpm install https://pkg.alchemy.run/@distilled.cloud/neon/pr:2062:7da3561pnpm install https://pkg.alchemy.run/@distilled.cloud/prisma/pr:2062:7da3561pnpm install https://pkg.alchemy.run/@distilled.cloud/planetscale/pr:2062:7da3561pnpm install https://pkg.alchemy.run/@distilled.cloud/railway/pr:2062:7da3561pnpm install https://pkg.alchemy.run/@distilled.cloud/stripe/pr:2062:7da3561pnpm install https://pkg.alchemy.run/@distilled.cloud/zerossl/pr:2062:7da3561Published |
BlankParticle
added a commit
to danieljvdm/alchemy-effect
that referenced
this pull request
Oct 6, 2026
…her in Containers.bind - Pass `binding.raw` to interceptOutboundHttp, interceptAllOutboundHttp and interceptOutboundHttps on the Containers.bind client, matching alchemy-run#2062 - Keep alchemy-run#2062's fix in the Containers.layer handle after the refactor - Fail Containers.layer monitor() with ContainerError instead of a defect, so StartContainer's catchTag("ContainerError") handles crashes - Cover interception through Containers.bind in the native fixture locally; live interception closes the connection with no response (TODO)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2061
interceptOutboundHttpandinterceptAllOutboundHttpon a container handle passed workerd atoCloudflareFetcherwrapper, which workerd rejects (parameter 2 is not of type 'Fetcher'). They also returned the rejected promise unawaited as the Effect's value, so the interception never registered and nothing reported it.workerd forwards intercepted requests to the binding over RPC, so it needs the native Fetcher, which every Alchemy
Fetchercarries asraw. A rejected registration now surfaces as a defect.LocalContainerIntercept.test.tscovers both methods underalchemy dev: a Durable Object that owns its container throughContainers.layerintercepts the container's requests with a stub for its own id. Onmainboth tests fail withgetaddrinfo ENOTFOUND.The open #1905 uses the same
toCloudflareFetcherconversion in its newContainers.bindhandle, so it needs the same change.