Skip to content

Commit d86ea43

Browse files
committed
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.
1 parent 490a663 commit d86ea43

3 files changed

Lines changed: 5 additions & 9 deletions

File tree

apps/preview-proxy/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -207,11 +207,11 @@ the shared `@cheatcode/observability` emitters.
207207
- Worker route: `*.${PREVIEW_HOSTNAME}/*` points only to
208208
`cheatcode-preview-proxy`. Cloudflare's most-specific-route rule lets the exact
209209
gateway and webhooks routes override it.
210-
- Exact no-script routes for `clerk.trycheatcode.com/*`,
211-
`docs.trycheatcode.com/*`, and `www.trycheatcode.com/*` negate the wildcard
212-
for Clerk, documentation, and the Vercel frontend hostname. The preview
213-
wildcard accepts only well-formed `{sandboxId}--{port}` hostnames; arbitrary
214-
wildcard labels are rejected by the normal preview-host validation.
210+
- Exact no-script routes for `clerk.trycheatcode.com/*` and
211+
`www.trycheatcode.com/*` negate the wildcard for Clerk and the Vercel frontend
212+
hostname. The preview wildcard accepts only well-formed
213+
`{sandboxId}--{port}` hostnames; arbitrary wildcard labels are rejected by
214+
the normal preview-host validation.
215215
- The wildcard route is declared in
216216
[`apps/preview-proxy/wrangler.jsonc`](./wrangler.jsonc) and deployed directly
217217
by [`.github/workflows/deploy-cloudflare.yml`](../../.github/workflows/deploy-cloudflare.yml).

packages/observability/src/errors.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ export class APIError extends Error {
1717
hint?: string;
1818
retriable?: boolean;
1919
details?: Record<string, unknown>;
20-
doc_url?: string;
2120
};
2221

2322
public constructor(
@@ -29,7 +28,6 @@ export class APIError extends Error {
2928
hint?: string;
3029
retriable?: boolean;
3130
details?: Record<string, unknown>;
32-
doc_url?: string;
3331
} = {},
3432
) {
3533
super(message, opts.cause === undefined ? undefined : { cause: opts.cause });
@@ -47,7 +45,6 @@ export class APIError extends Error {
4745
hint: this.opts.hint,
4846
retriable: this.retriable,
4947
request_id: requestId,
50-
doc_url: this.opts.doc_url ?? `https://docs.trycheatcode.com/errors/${this.code}`,
5148
details: this.opts.details,
5249
},
5350
},

packages/types/src/errors.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ export const ErrorResponseSchema = z.strictObject({
5757
hint: z.string().optional(),
5858
retriable: z.boolean(),
5959
request_id: z.string(),
60-
doc_url: z.string().url(),
6160
details: z.record(z.string(), z.unknown()).optional(),
6261
}),
6362
});

0 commit comments

Comments
 (0)