Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

errorCodeMessages.ts

8 lines307 Bytes

1import { PREVIEW_ERROR_CODE_MESSAGES } from "./previewConstants";
2​
3export function describePreviewError(description: string): string {
4 const friendly = PREVIEW_ERROR_CODE_MESSAGES[description];
5 if (friendly) return friendly;
6 if (description.length > 0) return description;
7 return "Network error";
8}