Mintplex-Labs/anything-llm · warning · Error
Error removing logo!
Error message
Error removing logo!
What it means
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.
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.
Defensive patterns
Strategy: try-catch
Validate before calling
// run before System.removeCustomLogo const isDefault = await System.isDefaultLogo(); if (isDefault) return; // no custom logo exists — nothing to remove
Try / catch
const { success, error } = await System.removeCustomLogo();
if (!success) {
console.warn('removeCustomLogo failed:', error);
// fall back to re-fetching branding state rather than blocking the UI
}
await refetchBranding(); Prevention
- 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.
When it happens
Trigger: Removing when no custom logo is currently set; a non-admin token hitting this system route; a filesystem error deleting the stored logo file.
Common situations: Clicking 'remove logo' twice; the logo was already reverted to default in another session; storage volume read-only after a container migration.
Understand the failure class
Background: 'Something went wrong' / 'Request failed (500)' / 'HTTP error! status: 404' — what failed HTTP requests actually mean and how to find the real cause — this error's family across 28 libraries.
Related errors
- Error uploading logo.
- Failed to remove pfp.
- Failed to update default system prompt.
- res.statusText
- Bad Request
AI-assisted analysis of Mintplex-Labs/anything-llm@20f6d3546c (2026-08-18).
Data as JSON: /api/errors/cd6ca9a4921ad5a7.
Report an issue: GitHub.
Appendix: source
Thrown at frontend/src/models/system.js:539
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);
return { success: false, error: e.message };
});
},
getApiKeys: async function () {
return fetch(`${API_BASE}/system/api-keys`, {
method: "GET",
headers: baseHeaders(),
})
.then((res) => {
if (!res.ok) {
throw new Error(res.statusText || "Error fetching api key.");
}
return res.json();
})
.catch((e) => {View on GitHub (pinned to 20f6d3546c)