{"record":{"id":"4090d0e5e2ded49f","repo":"Mintplex-Labs/anything-llm","slug":"no-updates-provided","errorCode":null,"errorMessage":"No updates provided","messagePattern":"No updates provided","errorType":"http","errorClass":null,"httpStatus":400,"severity":"error","filePath":"server/endpoints/system.js","lineNumber":1273,"sourceCode":"      const id = Number(sessionUser.id);\n\n      if (!id) {\n        response.status(400).json({ success: false, error: \"Invalid user ID\" });\n        return;\n      }\n\n      const updates = {};\n      // If the username is being changed, validate it.\n      // Otherwise, do not attempt to validate it to allow existing users to keep their username if not changing it.\n      if (username !== sessionUser.username)\n        updates.username = User.validations.username(String(username));\n      if (password) updates.password = String(password);\n      if (bio) updates.bio = String(bio);\n\n      if (Object.keys(updates).length === 0) {\n        response\n          .status(400)\n          .json({ success: false, error: \"No updates provided\" });\n        return;\n      }\n\n      const { success, error } = await User.update(id, updates);\n      response.status(200).json({ success, error });\n    } catch (e) {\n      console.error(e);\n      response\n        .status(500)\n        .json({ success: false, error: e.message || \"Internal server error\" });\n    }\n  });\n\n  app.get(\n    \"/system/slash-command-presets\",\n    [validatedRequest, flexUserRoleValid([ROLES.all])],\n    async (request, response) => {\n      try {","sourceCodeStart":1255,"sourceCodeEnd":1291,"githubUrl":"https://github.com/Mintplex-Labs/anything-llm/blob/20f6d3546c1938bfea1ad304f58a592dddcc5948/server/endpoints/system.js#L1255-L1291","documentation":"Validation in POST /system/user: after building the updates object from optional username/password/bio fields, it is empty, meaning the request body supplied no changes (or username equaled the current name and password/bio were absent). The update is skipped with a 400 response.","triggerScenarios":"Thrown at server/endpoints/system.js:1259 when the library encounters an invalid state.","commonSituations":"A user update request arrived with an empty update payload.","solutions":["Include at least one field to update in the request body.","Check the payload was serialized correctly."],"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"}