{"record":{"id":"3b338e91e622643c","repo":"Mintplex-Labs/anything-llm","slug":"no-logo-file-provided","errorCode":null,"errorMessage":"No logo file provided.","messagePattern":"No logo file provided\\.","errorType":"http","errorClass":null,"httpStatus":400,"severity":"error","filePath":"server/endpoints/system.js","lineNumber":969,"sourceCode":"            : error || \"Failed to remove profile picture.\",\n        });\n      } catch (error) {\n        console.error(\"Error processing the profile picture removal:\", error);\n        response.status(500).json({ message: \"Internal server error\" });\n      }\n    }\n  );\n\n  app.post(\n    \"/system/upload-logo\",\n    [\n      validatedRequest,\n      flexUserRoleValid([ROLES.admin, ROLES.manager]),\n      handleAssetUpload,\n    ],\n    async (request, response) => {\n      if (!request?.file || !request?.file.originalname) {\n        return response.status(400).json({ message: \"No logo file provided.\" });\n      }\n\n      if (!validFilename(request.file.originalname)) {\n        return response.status(400).json({\n          message: \"Invalid file name. Please choose a different file.\",\n        });\n      }\n\n      try {\n        const newFilename = await renameLogoFile(request.file.originalname);\n        const existingLogoFilename = await SystemSettings.currentLogoFilename();\n        await removeCustomLogo(existingLogoFilename);\n\n        const { success, error } = await SystemSettings._updateSettings({\n          logo_filename: newFilename,\n        });\n\n        return response.status(success ? 200 : 500).json({","sourceCodeStart":951,"sourceCodeEnd":987,"githubUrl":"https://github.com/Mintplex-Labs/anything-llm/blob/20f6d3546c1938bfea1ad304f58a592dddcc5948/server/endpoints/system.js#L951-L987","documentation":"Input validation on POST /system/upload-logo: the multipart request arrived without a file (request.file or originalname missing), meaning no logo was attached or the upload middleware rejected it silently. Returns HTTP 400 before any processing.","triggerScenarios":"Thrown at server/endpoints/system.js:955 when the library encounters an invalid state.","commonSituations":"The logo upload endpoint was called without a file.","solutions":["Attach a logo file to the request.","Use multipart/form-data with the correct file field name."],"exampleFix":null,"handlingStrategy":"validation","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"}