Repository navigation
Conversation
…ode() makeRestProtocol now sets an output member marked T.ResponseCode() to the response status. An idempotent create that answers 201 when it creates and 200 when the resource already existed can then say which happened. Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
…body Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
…mainOwnershipRequired Since 2026-11-06 the platform saves a domain ownership without its TXT record as unverified and returns it, instead of answering 422 domain-ownership-required. Patch 005 now adds DomainOwnershipRequired to createServiceDomain only. Regenerated from the 2026-11-19 Management API spec, which also adds Conflict to createWorkspace. Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
…mainOwnership Both creates answer 201 when they create and 200 when the resource already existed, with the same body. Patch 006 adds an httpStatus member bound to the response code, so a caller can tell whether it owns what came back. Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
Benchmarks: PR
|
| Metric | Change vs main | Programs |
|---|---|---|
| Bundle (gzip) | no change | 18 |
| Import heap | no change | 7 |
| Objects at import | no change | 7 |
| Added latency (p50) ¹ | 1 better | 7 |
| Import time ¹ | 4 better | 7 |
| First call ¹ | 4 better | 7 |
| Program | Call | Bundle (gzip) | Import heap | Objects at import | Added latency (p50) | Import time | First call |
|---|---|---|---|---|---|---|---|
| aws | s3.listBuckets |
79.4 KB | — | — | — | — | — |
| aws~awsJson1_0 | dynamodb.listTables |
71.7 KB | — | — | — | — | — |
| aws~awsJson1_1 | kms.listKeys |
70.9 KB | — | — | — | — | — |
| aws~awsQuery | sts.getCallerIdentity |
72.3 KB | — | — | — | — | — |
| aws~ec2Query | ec2.describeRegions |
72.4 KB | — | — | — | — | — |
| aws~restJson1 | lambda.listFunctions |
73.1 KB | — | — | — | — | — |
| azure | resources.ListTenants |
57.0 KB | — | — | — | — | — |
| cloudflare | workers.listScripts |
69.3 KB | — | — | — | — | — |
| cloudflare~CloudflareProtocol | ips.listIps |
49.9 KB | — | — | — | — | — |
| fly-io | machines.getRegions |
50.9 KB | 776.9 KB | 1,090 | 3.9 µs | 9.3 ms (−29.7%) 🟢 | 3.6 ms (−34.5%) 🟢 |
| fly-io~FlyApiProtocol | mpg.listUsers |
50.7 KB | 669.0 KB | 984 | 2.7 µs | 8.3 ms | 3.5 ms |
| fly-io~SpritesProtocol | sprites.createOrganizationToken |
51.3 KB | 707.2 KB | 1,026 | 6.1 µs (−56.2%) 🟢 | 8.7 ms (−26.1%) 🟢 | 3.6 ms (−31.6%) 🟢 |
| gcp | storage_v1.listBuckets |
51.8 KB | — | — | — | — | — |
| github | gists.list |
53.5 KB | 626.9 KB | 956 | 3.1 µs | 8.4 ms | 3.9 ms |
| neon | neon.listProjects |
52.2 KB | 838.7 KB | 1,086 | 2.1 µs | 9.1 ms (−42.2%) 🟢 | 3.8 ms (−43.2%) 🟢 |
| prisma | management.getBuilds |
50.1 KB | 772.1 KB | 1,047 | 1.4 µs | 8.4 ms | 3.4 ms |
| resend | resend.listLogs |
52.0 KB | 860.3 KB | 1,146 | 1.9 µs | 9.0 ms (−34.5%) 🟢 | 3.5 ms (−30.9%) 🟢 |
| stripe | stripe.GetFiles |
50.1 KB | — | — | — | — | — |
PR f3bce8aa6 against main 51ba3a2c6 (main's cached run from 2026-11-18 20:50 UTC). 18 programs, measured in 78 s on 8 vCPU.
| Package | Tarball | Unpacked | Files |
|---|---|---|---|
| core | 331.6 KB (+0.1%) | 1.3 MB (+0.1%) | 229 |
| fly-io | 249.9 KB | 1.6 MB | 71 |
| github | 2.1 MB | 19.6 MB | 338 |
| neon | 221.4 KB | 1.2 MB | 47 |
| prisma | 121.3 KB (+0.1%) | 876.2 KB (+0.1%) | 49 |
| resend | 173.2 KB | 1.2 MB | 57 |
| Tracked files | Size | Change vs main | Files |
|---|---|---|---|
services |
512.0 MB | +667 B | 3,024 |
in-tree-specs |
98.3 KB | ±0 B | 4 |
patches |
10.1 MB | +1.3 KB | 4,188 |
handwritten |
9.6 MB | +3.7 KB | 1,957 |
benches |
9.6 MB | ±0 B | 207 |
other |
2.6 MB | ±0 B | 515 |
| Total | 543.9 MB | +5.6 KB | 9,895 |
What a checkout or worktree writes to disk, from git ls-tree (benches/repo-size/tree.ts). The dashboard's Repo size page has the full picture.
Effect alone: effect-minimal bundle 8.9 KB gzip, hand-written effect-http call 48.6 KB gzip; effect import 76.6 ms and 12.8 MB heap; bare mocked HTTP roundtrip 11.6 µs p50.
Bundled (from src/): resend, neon, github, fly-io, aws, cloudflare, gcp, azure, stripe, prisma. Built and probed (from lib/): resend, neon, github, fly-io, prisma. Changed in this PR: prisma.
Job time: bundle 8.2 s, build: tsrs 2.3 s, build: bundle-lib 43.6 s, build: strip-lib-docs 0.1 s, build 46.0 s, size 1.1 s, runtime 16.5 s, providers 5.9 s.
¹ Timings run on a different runner than main's, so 🟡 marks a large move that may still be noise. Sizes, heap and object counts are stable. Offline: every call hits a canned in-memory response. Full suite: node benches/sdks/run.ts. Job log
|
Install the packages built from this commit: @distilled.cloud (122)pnpm install https://pkg.distilled.cloud/@distilled.cloud/acme/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/adyen/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/anthropic/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/apache-superset/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/archil/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/argocd/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/auth0/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/aws/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/aws4signer/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/axiom/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/azure/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/boat-dev/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/boxd/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/celld/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/chronosphere/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/clerk/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/clickhouse-cloud/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/cloudflare/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/coinbase/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/coinflow/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/convex/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/coolify/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/core/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/customerio/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/datadog/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/daytona/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/digitalocean/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/discord/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/docker/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/dokploy/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/doppler/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/e2b/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/elasticsearch/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/entire/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/exa/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/expo-eas/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/fly-io/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/forgejo/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/gcp/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/github/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/google-workspace/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/grafana/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/growthbook/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/gusto/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/hetzner/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/hostinger/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/huggingface/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/hydradb/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/iceberg/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/infisical/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/inngest/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/intercom/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/kubernetes/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/launchdarkly/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/linear/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/mailchimp/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/meilisearch/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/mercury/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/metabase/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/modal/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/modrinth/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/mongodb-atlas/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/mux/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/namespacelabs/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/neon/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/netbird/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/notion/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/npm/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/okta/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/onepassword/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/opencode/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/opensearch/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/ovh/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/paypal/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/plaid/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/planetscale/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/polar/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/polymarket/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/porkbun/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/posthog/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/prisma/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/proxmox/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/questrade/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/railway/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/redis-cloud/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/remote/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/render/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/resend/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/revenuecat/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/rivet/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/s2/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/s3/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/scaleway/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/sentry/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/slack/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/spacetimedb/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/squarespace/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/stackit/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/starburst-galaxy/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/steel/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/stripe/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/supabase/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/surrealdb/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/tailscale/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/technitium/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/temporal/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/tencentcloud/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/tinybird/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/trigger-dev/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/turbopuffer/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/turso/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/twitch/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/typesense/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/unkey/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/vanta/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/vercel/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/whatsapp/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/whop/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/workos/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/xata/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/zendesk/pr:1348:f3bce8apnpm install https://pkg.distilled.cloud/@distilled.cloud/zerossl/pr:1348:f3bce8aPublished |
… and httpStatus is required The shared generator binds the standard smithy.api#httpResponseCode trait to T.ResponseCode(), next to httpHeader, so Prisma no longer needs its own binding. No converter emits the trait, so no other SDK changes; regenerating AWS from its mirror changes nothing. Patch 006 marks httpStatus required, so its type is number. Its documentation now says it is the status of the last attempt, since a retried create that already succeeded answers 200. The patch description says the spec is correct and this is an SDK addition. responseCodeKey and withResponseCode move to protocol-http.ts, next to withResponseHeaders. The test that fed an array body to a structure output is removed. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
createServiceUrl and updateUrl fail with one error per refusal, matched on error.code: RoutingUrlQuotaExceeded (409 quota-exceeded), RoutingUrlLogicalIdTaken (409 logical-id-taken), RoutingUrlInvalidHostname (422 invalid-hostname), RoutingUrlServiceNotOnABranch (422 service-not-on-a-branch, create only) and RoutingUrlServiceOnAnotherBranch (422 service-on-another-branch, update only). RoutingUrlQuotaExceeded is also a QuotaError and RoutingUrlLogicalIdTaken an AlreadyExistsError. A 422 validation-error, or any other code, is still Conflict or UnprocessableEntity. Regenerated from the 2026-11-21 Management API spec (mirror e48eb8d), which declares these codes as enums on each response. It also adds a required `state` to every RoutingUrl output and types the 409 and 422 error bodies. The rest of the generated diff is chunk renumbering. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
|
yeah.... this doesn't seem like a good idea to me. There are 2 schools of thought contributing to my opinion on that:
|
Main removed the protocol layer form and declares errors on the operation, the service and the protocol. Adapted to it: - core/protocol-rest: kept main's restProtocol structure; decodeSuccess still takes the response status, and openFramed's two calls now pass response.status. - core test: the response code describe block is named after restProtocol, as main renamed the others. - prisma: management.ts regenerated with pnpm generate prisma on spec mirror e48eb8d. Patches 005, 006 and 007 needed no change; the generated operations now list serviceErrors as main does. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
I agree that users of the Alchemy provider API should never need to see HTTP status codes. However, the Distilled SDK exists to generate a client from platform API specs. The Prisma API returns both outcomes as a success, with the status the only thing that tells them apart: Distilled already models this the same way in other places. Alchemy's users never see the status. Only the resource's internals read it, to decide whether the stack owns the row or has to ask for
That's what an idempotent create is: asking for something that already exists succeeds and returns it. That's deliberate, and we won't change the API to report it as an error. This is a ubiquitous pattern across HTTP and REST APIs. If we accept your suggestion to return this as "success or tagged error", the SDK would need to convert the
I think it's a better solution to simply retain |
The Prisma SDK is regenerated on main's generator. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
|
distilled generates clients from the spec, not from the mirror of the actual http layer; Distilled SDK users also shouldn't need to deal with status codes, thats why we convert them into typed errors for users. the AWS values come from AWS's own specs. you work at Prisma, if consumers of the api need to know if a create made the resource or not that should go in the API, not a patch in our SDK that adds a value the spec doesn't have.
this exact argument shows why this is irrelevant here, since a 503 and a retry would put alchemy in the incorrect state where it think it didn't create this and therefore alchemy would treat the resource as found not created, no? if you want creates to be safe to retry you should use an idempotency key, like other SDKs use. we have good support for this in distilled where we will create one for the user if the field has the appropriate trait |
|
@Mkassabov ok, I will remove the HTTP status handling from the PR. We will not change the API's behavior for a single consumer. I'd be happy to add metadata to the OpenAPI spec but I can't see a way to express the meaning of the response code in the same way the AWS implementation does, so we'll just drop that information. |
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
…for it The REST protocol, its helpers, their tests and the shared generator are back to main. The Prisma SDK no longer exposes the create response status. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
… no longer return httpStatus Patch 006 is gone, so the two create results carry only what Prisma's spec declares. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
…t verified The spec says the create returns the domain ownership verified when its TXT record already carries the workspace's value, and unverified otherwise. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>







A caller of Prisma's RoutingUrl API could not tell from
@distilled.cloud/prismawhich refusal it got. Now it can:alchemy-run/alchemy#3529 (
Prisma.RoutingUrl,Prisma.DomainOwnership) is the caller, and depends on this.The failing calls
Refusals told apart only by their message.
POST /v1/services/{serviceId}/urlsandPATCH /v1/urls/{id}answer five different refusals with409and422. Since 2026-11-20 the spec declares the code of each as an enum onerror.code:error.codequota-exceeded,logical-id-takeninvalid-hostname,service-not-on-a-branch,validation-errorinvalid-hostname,service-on-another-branch,validation-errorThe SDK returned all of them as
ConflictorUnprocessableEntity, which keep only the message.An error the API no longer returns.
createWorkspaceDomainOwnershiplistedDomainOwnershipRequired(422domain-ownership-required). For a valid hostname Prisma now saves the domain ownership and returns it,verifiedwhen DNS already has the TXT record andunverifiedotherwise; the spec lists a 422 on this route for an invalid hostname only.Evidence for both is Prisma's published spec,
GET https://api.prisma.io/v1/doc. No live account was used.What changed
Only
packages/prisma:/error/code, as patch 005 does forDomainOwnershipRequired.validation-errorand any other code stayUnprocessableEntityandConflict.DomainOwnershipRequiredtocreateWorkspaceDomainOwnership. It still types it oncreateServiceDomain, where the spec still documents it.fc91281→e48eb8d(2026-11-21). Apart from the above, the regeneration addsConflicttocreateWorkspaceand a requiredstatemember to every RoutingUrl output (what the hostname is doing now, such aswaiting_for_dnsorcertificate_failed); the rest of the diff inmanagement.tsis the spec's reworded descriptions of a RoutingUrl'sstatusandrecords, and the generator renumbering its schema indexes.Breaking (
!):createWorkspaceDomainOwnershipno longer fails withDomainOwnershipRequired;createServiceUrlandupdateUrlcan fail with four new typed errors each;createWorkspacecan fail withConflict; RoutingUrl outputs have a requiredstate.An earlier version of this pull request also exposed the HTTP status of two creates and changed core and the shared generator for it. That is removed, as agreed in the comments.
Checks:
pnpm typecheck:ci,pnpm vitest run packages/core packages/prisma,pnpm format:check,pnpm lint(0 errors),pnpm specs:check,pnpm patches:audit prisma(all patches needed).Agent: prospero-20
🤖 Generated with Claude Code
Note
This comment was left by an agent on behalf of @wmadden
model: fable 5.2
harness: Claude Code in the Claude desktop app (Claude Agent SDK 0.3.330)
As an agent I have read the CONTRIBUTING.md and AGENTS.md and understand the risks of getting @wmadden flagged as untrustworthy if I regularly violate the outlined rules