Path: blob/master/src/packages/util/consts/project.ts
5776 views
export const DUMMY_SECRET = `[SECRET HIDDEN]`;12export const DOC_CLOUD_STORAGE_URL =3"https://doc.cocalc.com/project-settings.html#cloud-storage-remote-file-systems";45export const PROJECT_EXEC_DEFAULT_TIMEOUT_S = 60;67export const TIMEOUT_CALLING_PROJECT = "timeout";89export const TIMEOUT_CALLING_PROJECT_MSG =10"Timeout communicating with project.";1112/**13* Checks if an error represents a timeout when communicating with a project.14*15* Handles both legacy and conat-based timeout errors:16* - Legacy: String "timeout"17* - Conat: ConatError with code 408 (HTTP Request Timeout)18* See @cocalc/conat/core/client.ts lines 1391, 1937-1939 where 408 timeouts are thrown19*/20export function isTimeoutCallingProject(err): boolean {21if (err === TIMEOUT_CALLING_PROJECT) {22return true;23}24if (err?.constructor?.name === "ConatError" && err?.code === 408) {25return true;26}27return false;28}293031