{"record":{"id":"d128ba1c4a06b019","repo":"Mintplex-Labs/anything-llm","slug":"user-is-suspended-from-system","errorCode":null,"errorMessage":"User is suspended from system","messagePattern":"User is suspended from system","errorType":"http","errorClass":null,"httpStatus":401,"severity":"error","filePath":"server/utils/middleware/validBrowserExtensionApiKey.js","lineNumber":38,"sourceCode":"  const apiKey = await BrowserExtensionApiKey.validate(bearerKey);\n  if (!apiKey) {\n    response.status(403).json({\n      error: \"No valid API key found.\",\n    });\n    return;\n  }\n\n  if (multiUserMode) {\n    const user = await User.get({ id: apiKey.user_id });\n    if (!user) {\n      response.status(403).json({\n        error: \"User not found.\",\n      });\n      return;\n    }\n\n    if (user.suspended) {\n      response.status(401).json({\n        error: \"User is suspended from system\",\n      });\n      return;\n    }\n\n    response.locals.user = user;\n  }\n\n  response.locals.apiKey = apiKey;\n  next();\n}\n\nmodule.exports = { validBrowserExtensionApiKey };\n","sourceCodeStart":20,"sourceCodeEnd":52,"githubUrl":"https://github.com/Mintplex-Labs/anything-llm/blob/3aec848f2885144aa8f1e53b9731a04310d5d558/server/utils/middleware/validBrowserExtensionApiKey.js#L20-L52","documentation":"Account-state guard in validBrowserExtensionApiKey: multi-user mode is on, the key is valid, and the owning user exists, but user.suspended is true, so the suspended account's extension requests are refused with 401.","triggerScenarios":"Suspended user attempted to authenticate via browser extension API key. Triggered when the resolved user account is suspended (validBrowserExtensionApiKey.js:38).","commonSituations":"See trigger scenarios.","solutions":["Have an administrator unsuspend the user account in the user management settings.","Use credentials of a non-suspended user."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3aec848f2885144aa8f1e53b9731a04310d5d558","analyzedAt":"2026-08-18T10:02:21.017Z","contentChangedAt":"2026-08-18T10:02:21.017Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}