Mintplex-Labs/anything-llm · warning · Error
Failed to get is default logo!
Error message
Failed to get is default logo!
What it means
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.
Source
Thrown at frontend/src/models/system.js:524
headers: baseHeaders(),
})
.then((res) => {
if (res.ok) return { success: true, error: null };
throw new Error("Failed to remove pfp.");
})
.catch((e) => {
console.log(e);
return { success: false, error: e.message };
});
},
isDefaultLogo: async function () {
return await fetch(`${API_BASE}/system/is-default-logo`, {
method: "GET",
cache: "no-cache",
})
.then((res) => {
if (!res.ok) throw new Error("Failed to get is default logo!");
return res.json();
})
.then((res) => res?.isDefaultLogo)
.catch((e) => {
console.log(e);
return null;
});
},
removeCustomLogo: async function () {
return await fetch(`${API_BASE}/system/remove-logo`, {
headers: baseHeaders(),
})
.then((res) => {
if (res.ok) return { success: true, error: null };
throw new Error("Error removing logo!");
})
.catch((e) => {
console.log(e);View on GitHub (pinned to 526360e320)
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.
Defensive patterns
Strategy: fallback
Validate before calling
// No auth header sent; ensure the route is reachable unauthenticated.
if (!(await System.ping())) { /* skip isDefaultLogo */ } Type guard
/** @param {any} r @returns {r is boolean} */
function isBoolOrNull(r) { return r === null || typeof r === "boolean"; } Try / catch
const isDefault = await System.isDefaultLogo(); // null means unknown/failed — default to 'use default logo'.
Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Failed to fetch logo!
- Error removing logo!
- Error uploading logo.
- Failed to sync link content. ${reason}
- Failed to sync YouTube video transcript. ${reason}
AI-assisted analysis of Mintplex-Labs/anything-llm@526360e320 (2026-08-13).
Data as JSON: /api/errors/ad25eecbfdf650ee.
Report an issue: GitHub.