{"record":{"id":"7552a033b0ad53fc","repo":"Mintplex-Labs/anything-llm","slug":"invalid-command","errorCode":null,"errorMessage":"Invalid command","messagePattern":"Invalid command","errorType":"http","errorClass":null,"httpStatus":400,"severity":"error","filePath":"server/endpoints/mobile/utils/index.js","lineNumber":194,"sourceCode":"      thread,\n      message,\n      mode: \"chat\",\n      user: user,\n      sessionId: null,\n      attachments: [],\n      reset: false,\n    });\n    return response.end();\n  }\n\n  if (command === \"unregister-device\") {\n    if (!response.locals.device)\n      return response.status(200).json({ success: true });\n    await MobileDevice.delete(response.locals.device.id);\n    return response.status(200).json({ success: true });\n  }\n\n  return response.status(400).json({ error: \"Invalid command\" });\n}\n\nmodule.exports = {\n  handleMobileCommand,\n};\n","sourceCodeStart":176,"sourceCodeEnd":200,"githubUrl":"https://github.com/Mintplex-Labs/anything-llm/blob/20f6d3546c1938bfea1ad304f58a592dddcc5948/server/endpoints/mobile/utils/index.js#L176-L200","documentation":"Terminal branch of handleMobileCommand(): the command string did not match any of the known mobile commands, so the request falls through all handlers and is rejected with HTTP 400. It indicates a client/server command-name mismatch.","triggerScenarios":"Thrown at server/endpoints/mobile/utils/index.js:190 when the library encounters an invalid state.","commonSituations":"The mobile endpoint received a command string it does not recognize.","solutions":["Use one of the supported command values for this endpoint.","Check the mobile client/server versions are in sync."],"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-14T00:17:10.932Z"}