From d86ea4360af1ebe619b34e369e49eb57e25ea36e Mon Sep 17 00:00:00 2001 From: iamjr15 Date: Fri, 31 Jul 2026 21:24:43 +0530 Subject: [PATCH] fix(api): remove dead error documentation links Remove the unused documentation URL from API errors and their strict schema. Update preview routing docs so they describe only active host reservations. --- apps/preview-proxy/README.md | 10 +++++----- packages/observability/src/errors.ts | 3 --- packages/types/src/errors.ts | 1 - 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/apps/preview-proxy/README.md b/apps/preview-proxy/README.md index fdb75936..bd5836d4 100644 --- a/apps/preview-proxy/README.md +++ b/apps/preview-proxy/README.md @@ -207,11 +207,11 @@ the shared `@cheatcode/observability` emitters. - Worker route: `*.${PREVIEW_HOSTNAME}/*` points only to `cheatcode-preview-proxy`. Cloudflare's most-specific-route rule lets the exact gateway and webhooks routes override it. -- Exact no-script routes for `clerk.trycheatcode.com/*`, - `docs.trycheatcode.com/*`, and `www.trycheatcode.com/*` negate the wildcard - for Clerk, documentation, and the Vercel frontend hostname. The preview - wildcard accepts only well-formed `{sandboxId}--{port}` hostnames; arbitrary - wildcard labels are rejected by the normal preview-host validation. +- Exact no-script routes for `clerk.trycheatcode.com/*` and + `www.trycheatcode.com/*` negate the wildcard for Clerk and the Vercel frontend + hostname. The preview wildcard accepts only well-formed + `{sandboxId}--{port}` hostnames; arbitrary wildcard labels are rejected by + the normal preview-host validation. - The wildcard route is declared in [`apps/preview-proxy/wrangler.jsonc`](./wrangler.jsonc) and deployed directly by [`.github/workflows/deploy-cloudflare.yml`](../../.github/workflows/deploy-cloudflare.yml). diff --git a/packages/observability/src/errors.ts b/packages/observability/src/errors.ts index 6b7b2d78..a5af340d 100644 --- a/packages/observability/src/errors.ts +++ b/packages/observability/src/errors.ts @@ -17,7 +17,6 @@ export class APIError extends Error { hint?: string; retriable?: boolean; details?: Record; - doc_url?: string; }; public constructor( @@ -29,7 +28,6 @@ export class APIError extends Error { hint?: string; retriable?: boolean; details?: Record; - doc_url?: string; } = {}, ) { super(message, opts.cause === undefined ? undefined : { cause: opts.cause }); @@ -47,7 +45,6 @@ export class APIError extends Error { hint: this.opts.hint, retriable: this.retriable, request_id: requestId, - doc_url: this.opts.doc_url ?? `https://docs.trycheatcode.com/errors/${this.code}`, details: this.opts.details, }, }, diff --git a/packages/types/src/errors.ts b/packages/types/src/errors.ts index d2dd6638..0a4b96b0 100644 --- a/packages/types/src/errors.ts +++ b/packages/types/src/errors.ts @@ -57,7 +57,6 @@ export const ErrorResponseSchema = z.strictObject({ hint: z.string().optional(), retriable: z.boolean(), request_id: z.string(), - doc_url: z.string().url(), details: z.record(z.string(), z.unknown()).optional(), }), });