fix(cloudflare/workers): type createRoute code 10019 as RouteScriptNotFound#368
Merged
Merged
Conversation
POST /zones/{zone}/workers/routes rejects with code 10019 ("Cannot
configure a route for a Worker which does not exist") when the script
has not propagated yet — probed live. Surface it as the existing
WorkerNotFound tag so consumers can retry the propagation race without
catching UnknownCloudflareError.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
sam-goodwin
added a commit
to alchemy-run/alchemy-effect
that referenced
this pull request
Jul 8, 2026
Probed live: creating a route for a not-yet-propagated script rejects with code 10019, now typed as WorkerNotFound via distilled patch (alchemy-run/distilled#368). Drop the speculative InternalServerError / UnknownCloudflareError retry. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
|
Install the packages built from this commit: @distilled.cloud/core bun add @distilled.cloud/core@https://pkg.distilled.cloud/core/8e6eb0c@distilled.cloud/cloudflare bun add @distilled.cloud/cloudflare@https://pkg.distilled.cloud/cloudflare/8e6eb0c |
…RouteScriptNotFound tag WorkerNotFound is shared by ~38 workers operations; widening its matcher list to code 10019 would relabel that code everywhere the tag is declared, and 10019 is only verified for createRoute (codes are not unique across endpoint families — KV uses 10019 for TitleRequired). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
sam-goodwin
added a commit
to alchemy-run/alchemy-effect
that referenced
this pull request
Jul 8, 2026
…tFound tag Scoped tag instead of widening the shared WorkerNotFound matchers (alchemy-run/distilled#368). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
POST /zones/{zone}/workers/routesrejects with code 10019 when the referenced script does not exist (probed live):{ "code": 10019, "message": "Cannot configure a route for a Worker which does not exist. Please ensure this Worker exists and try again." }Type it as a dedicated
RouteScriptNotFoundtag scoped tocreateRouteso consumers can retry the create-route-right-after-put-script propagation race on a typed tag instead ofUnknownCloudflareError:export type CreateRouteError = | DefaultErrors + | RouteScriptNotFound | InvalidRoutePattern | InvalidRoute | Forbidden;A dedicated tag rather than widening the shared
WorkerNotFoundmatcher list:WorkerNotFoundis declared by ~38 workers operations, and code 10019 is only verified forcreateRoute— Cloudflare error codes are not unique across endpoint families (KV uses 10019 for a missing title).Needed by alchemy-run/alchemy-effect#438 (Worker
routesprop).