@devries-cameron20 / t3code-1 / commits / b49a2e677c
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Remove unused code parameter from describePreviewError (#3970)

Co-authored-by: Julius Marminge <julius0216@outlook.com> Co-authored-by: Julius Marminge <jmarminge@gmail.com>

Kriday Dave committed Jul 18, 2026 at 01:20 UTC b49a2e677c6fba6d705ad16dbd913f56df4035d6
2 files changed +4 -4
apps/web/src/components/preview/PreviewUnreachable.tsx
+1 -1
@@ -17,7 +17,7 @@ interface Props {
17 export function PreviewUnreachable({ url, code, description, onReload }: Props) {
18 const [showDetails, setShowDetails] = useState(false);
19 const host = safeHost(url) ?? url;
20 - const friendly = describePreviewError(code, description);
20 + const friendly = describePreviewError(description);
21 const errorLabel = description.length > 0 ? description : `ERR_${Math.abs(code) || "FAILED"}`;
22
23 return (
apps/web/src/components/preview/errorCodeMessages.ts
+3 -3
@@ -2,11 +2,11 @@ import { PREVIEW_ERROR_CODE_MESSAGES } from "./previewConstants";
2
3 /**
4 * Resolve a friendly description for a Chromium / network error. Falls back
5 - * to the description string passed in when the code isn't in our table.
5 + * to the description string passed in when it isn't in our table.
6 */
7 -export function describePreviewError(code: number, description: string): string {
7 +export function describePreviewError(description: string): string {
8 const friendly = PREVIEW_ERROR_CODE_MESSAGES[description];
9 if (friendly) return friendly;
10 if (description.length > 0) return description;
11 - return `Network error (${code})`;
11 + return "Network error";
12 }