{"record":{"id":"ad25eecbfdf650ee","repo":"Mintplex-Labs/anything-llm","slug":"failed-to-get-is-default-logo","errorCode":null,"errorMessage":"Failed to get is default logo!","messagePattern":"Failed to get is default logo!","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"frontend/src/models/system.js","lineNumber":524,"sourceCode":"      headers: baseHeaders(),\n    })\n      .then((res) => {\n        if (res.ok) return { success: true, error: null };\n        throw new Error(\"Failed to remove pfp.\");\n      })\n      .catch((e) => {\n        console.log(e);\n        return { success: false, error: e.message };\n      });\n  },\n\n  isDefaultLogo: async function () {\n    return await fetch(`${API_BASE}/system/is-default-logo`, {\n      method: \"GET\",\n      cache: \"no-cache\",\n    })\n      .then((res) => {\n        if (!res.ok) throw new Error(\"Failed to get is default logo!\");\n        return res.json();\n      })\n      .then((res) => res?.isDefaultLogo)\n      .catch((e) => {\n        console.log(e);\n        return null;\n      });\n  },\n  removeCustomLogo: async function () {\n    return await fetch(`${API_BASE}/system/remove-logo`, {\n      headers: baseHeaders(),\n    })\n      .then((res) => {\n        if (res.ok) return { success: true, error: null };\n        throw new Error(\"Error removing logo!\");\n      })\n      .catch((e) => {\n        console.log(e);","sourceCodeStart":506,"sourceCodeEnd":542,"githubUrl":"https://github.com/Mintplex-Labs/anything-llm/blob/526360e320da9d1b36074be5ed64fe76e5bbfbbd/frontend/src/models/system.js#L506-L542","documentation":"Thrown by System.isDefaultLogo on a non-2xx GET to /api/system/is-default-logo. Like fetchLogo it sends NO auth headers (must work pre-login) and uses cache:'no-cache'. The .catch() returns null, so a failure is indistinguishable from a genuine 'unknown' state — callers cannot tell error-default from default-logo.","triggerScenarios":"Calling isDefaultLogo() when the route is unreachable (500), when no logo state has been initialized on a fresh deploy, or when the deployment is behind a proxy that requires auth on all routes.","commonSituations":"Fresh install where the default-logo flag was never written; a proxy enforces auth on /system/* globally and rejects the unauthenticated request; the route was renamed in a version mismatch between frontend and backend.","solutions":["GET /api/system/is-default-logo directly in the browser and read the status.","Ensure the route is exempt from any global auth middleware (it sends no token).","Verify frontend and backend versions match so the route exists.","Treat null as 'use default' in the UI since that is the safe fallback."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// No auth header sent; ensure the route is reachable unauthenticated.\nif (!(await System.ping())) { /* skip isDefaultLogo */ }","typeGuard":"/** @param {any} r @returns {r is boolean} */\nfunction isBoolOrNull(r) { return r === null || typeof r === \"boolean\"; }","tryCatchPattern":"const isDefault = await System.isDefaultLogo();\n// null means unknown/failed — default to 'use default logo'.","preventionTips":["Ensure /system/is-default-logo is exempt from global auth middleware.","Treat null as 'default' for a safe UI fallback.","Verify frontend/backend versions match so the route exists."],"tags":["network","branding","logo"],"backgroundTag":null,"analyzedSha":"526360e320da9d1b36074be5ed64fe76e5bbfbbd","analyzedAt":"2026-08-13T01:45:47.170Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}