Repository navigation
fix(archil)!: catch Archil errors by their error code - #3154
Merged
sam-goodwin merged 14 commits intoNov 8, 2026
Merged
sam-goodwin merged 14 commits into
sam-goodwin merged 14 commits into
Conversation
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Contributor
|
Install the packages built from this commit: alchemypnpm install https://pkg.alchemy.run/alchemy/pr:3154:6c9e293@alchemy.run (33)pnpm install https://pkg.alchemy.run/@alchemy.run/better-auth/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@alchemy.run/git/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@alchemy.run/drizzle/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@alchemy.run/acme/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@alchemy.run/archil/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@alchemy.run/boat/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@alchemy.run/axiom/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@alchemy.run/doppler/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@alchemy.run/infisical/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@alchemy.run/turso/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@alchemy.run/e2b/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@alchemy.run/daytona/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@alchemy.run/modal/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@alchemy.run/planetscale/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@alchemy.run/neon/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@alchemy.run/prisma/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@alchemy.run/hetzner/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@alchemy.run/railway/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@alchemy.run/fly/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@alchemy.run/github/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@alchemy.run/stripe/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@alchemy.run/cloudflare/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@alchemy.run/gcp/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@alchemy.run/aws/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@alchemy.run/domain/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@alchemy.run/kubernetes/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@alchemy.run/docker/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@alchemy.run/redis/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@alchemy.run/sql/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@alchemy.run/cloudflare-runtime/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@alchemy.run/frontend-frameworks/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@alchemy.run/node-utils/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@alchemy.run/pkg/pr:3154:6c9e293Transitive Dependencies (25)pnpm install https://pkg.alchemy.run/@distilled.cloud/aws/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@distilled.cloud/acme/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@distilled.cloud/archil/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@distilled.cloud/core/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@distilled.cloud/boat-dev/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@distilled.cloud/axiom/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@distilled.cloud/doppler/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@distilled.cloud/infisical/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@distilled.cloud/turso/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@distilled.cloud/e2b/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@distilled.cloud/daytona/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@distilled.cloud/modal/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@distilled.cloud/planetscale/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@distilled.cloud/neon/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@distilled.cloud/s3/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@distilled.cloud/prisma/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@distilled.cloud/hetzner/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@distilled.cloud/railway/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@distilled.cloud/fly-io/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@distilled.cloud/github/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@distilled.cloud/stripe/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@distilled.cloud/aws4signer/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@distilled.cloud/cloudflare/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@distilled.cloud/iceberg/pr:3154:6c9e293pnpm install https://pkg.alchemy.run/@distilled.cloud/gcp/pr:3154:6c9e293Published |
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.
Archil's errors arrive as one tag per Archil error code (alchemy-run/distilled#1091), and alchemy stops building distilled errors with codes it made up.
yield* archil.getSandbox({ sid }).pipe( - Effect.catchTag("SandboxNotFound", () => Effect.undefined), + Effect.catchTag("NotFound", () => Effect.undefined), ); archil.createSandbox(request).pipe( - Effect.catchTag("SandboxAlreadyExists", () => + Effect.catchTag("SandboxNameConflict", (conflict) => findSandboxByName(name).pipe( - Effect.flatMap((found) => found ? Effect.succeed(found) - : Effect.fail(new archil.SandboxAlreadyExists({ error: `Sandbox ${name} exists…` }))), + Effect.flatMap((found) => (found ? Effect.succeed(found) : Effect.fail(conflict))), ), ), );A disk Archil reports as created without an id is alchemy's own error, not a fake
DiskNotFoundthat callers treat as "already gone":A paused sandbox refuses connections with
SandboxTerminated, which is what the resume-and-retry path now catches. Booting a program sandbox ignoresSandboxStartConflict.SandboxPausingandSandboxStoppingare retried by the SDK. A branch create that loses a race recovers throughConflict(alchemy-run/distilled#1093), andBranchDisk.branchnow goes through the same path, so concurrentbranch({ name })calls return one branch instead of failing all but the first, and theDiskAlreadyExistscatch is gone:createDiskreturns the existing disk for a taken name.Bumps
submodules/distilledto distilledmainwith alchemy-run/distilled#1091 and alchemy-run/distilled#1093.