{"record":{"id":"bb0a25c6495e0cca","repo":"Mintplex-Labs/anything-llm","slug":"error-removing-the-logo","errorCode":null,"errorMessage":"Error removing the logo.","messagePattern":"Error removing the logo\\.","errorType":"http","errorClass":null,"httpStatus":500,"severity":"error","filePath":"server/endpoints/system.js","lineNumber":1029,"sourceCode":"  app.get(\n    \"/system/remove-logo\",\n    [validatedRequest, flexUserRoleValid([ROLES.admin, ROLES.manager])],\n    async (_request, response) => {\n      try {\n        const currentLogoFilename = await SystemSettings.currentLogoFilename();\n        await removeCustomLogo(currentLogoFilename);\n        const { success, error } = await SystemSettings._updateSettings({\n          logo_filename: LOGO_FILENAME,\n        });\n\n        return response.status(success ? 200 : 500).json({\n          message: success\n            ? \"Logo removed successfully.\"\n            : error || \"Failed to update with new logo.\",\n        });\n      } catch (error) {\n        console.error(\"Error processing the logo removal:\", error);\n        response.status(500).json({ message: \"Error removing the logo.\" });\n      }\n    }\n  );\n\n  app.get(\"/system/api-keys\", [validatedRequest], async (_, response) => {\n    try {\n      if (response.locals.multiUserMode) {\n        return response.sendStatus(401).end();\n      }\n\n      const apiKeys = await ApiKey.where({});\n      return response.status(200).json({\n        apiKeys,\n        error: null,\n      });\n    } catch (error) {\n      console.error(error);\n      response.status(500).json({","sourceCodeStart":1011,"sourceCodeEnd":1047,"githubUrl":"https://github.com/Mintplex-Labs/anything-llm/blob/20f6d3546c1938bfea1ad304f58a592dddcc5948/server/endpoints/system.js#L1011-L1047","documentation":"Catch block of GET /system/remove-logo: deleting the custom logo file or resetting logo_filename to the default in SystemSettings threw. The client receives this message indicating the logo reset did not complete.","triggerScenarios":"Thrown at server/endpoints/system.js:1015 when the library encounters an invalid state.","commonSituations":"Removing the custom logo failed on the filesystem.","solutions":["Check server logs for the delete error.","Verify the logo file exists and the process has permission to remove it."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"20f6d3546c1938bfea1ad304f58a592dddcc5948","analyzedAt":"2026-08-18T10:02:21.017Z","contentChangedAt":"2026-08-18T10:02:21.017Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}