{"record":{"id":"cd6ca9a4921ad5a7","repo":"Mintplex-Labs/anything-llm","slug":"error-removing-logo","errorCode":null,"errorMessage":"Error removing logo!","messagePattern":"Error removing logo!","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"frontend/src/models/system.js","lineNumber":539,"sourceCode":"      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);\n        return { success: false, error: e.message };\n      });\n  },\n  getApiKeys: async function () {\n    return fetch(`${API_BASE}/system/api-keys`, {\n      method: \"GET\",\n      headers: baseHeaders(),\n    })\n      .then((res) => {\n        if (!res.ok) {\n          throw new Error(res.statusText || \"Error fetching api key.\");\n        }\n        return res.json();\n      })\n      .catch((e) => {","sourceCodeStart":521,"sourceCodeEnd":557,"githubUrl":"https://github.com/Mintplex-Labs/anything-llm/blob/20f6d3546c1938bfea1ad304f58a592dddcc5948/frontend/src/models/system.js#L521-L557","documentation":"Thrown by removeCustomLogo in the AnythingLLM frontend when the request to /api/system/remove-logo responds non-2xx, with the fixed message 'Error removing logo!'. Note the fetch sets no method, so it defaults to GET — the route must accept that verb or every call fails regardless of state.","triggerScenarios":"Removing when no custom logo is currently set; a non-admin token hitting this system route; a filesystem error deleting the stored logo file.","commonSituations":"Clicking 'remove logo' twice; the logo was already reverted to default in another session; storage volume read-only after a container migration.","solutions":["Refresh branding state first — if the default logo is already active (isDefaultLogo() returns true), skip the call.","Confirm you are authenticated as an admin.","Check server storage permissions for the assets folder.","Check the Network tab status code; a 404/405 suggests a method/route mismatch on the server."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// run before System.removeCustomLogo\nconst isDefault = await System.isDefaultLogo();\nif (isDefault) return; // no custom logo exists — nothing to remove","typeGuard":null,"tryCatchPattern":"const { success, error } = await System.removeCustomLogo();\nif (!success) {\n  console.warn('removeCustomLogo failed:', error);\n  // fall back to re-fetching branding state rather than blocking the UI\n}\nawait refetchBranding();","preventionTips":["Check isDefaultLogo() before offering the remove action.","Confirm admin role before showing branding controls.","Resync branding state after every mutation instead of tracking it locally."],"tags":["anythingllm","branding","http-delete","admin"],"backgroundTag":"http-request-failed","analyzedSha":"20f6d3546c1938bfea1ad304f58a592dddcc5948","analyzedAt":"2026-08-18T10:02:21.017Z","contentChangedAt":"2026-08-18T10:02:21.017Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}