{"record":{"id":"5922677ba2150987","repo":"AlistGo/alist","slug":"user-q-not-found-w","errorCode":null,"errorMessage":"user %q not found: %w","messagePattern":"user %q not found: %w","errorType":"http","errorClass":null,"httpStatus":500,"severity":"error","filePath":"server/mcp/auth.go","lineNumber":173,"sourceCode":"\t}\n}\n\n// resolveUserForStdio resolves a user by username for STDIO mode.\nfunc resolveUserForStdio(username string) (*model.User, error) {\n\tusername = strings.TrimSpace(username)\n\tif username == \"\" || username == \"admin\" {\n\t\tadmin, err := op.GetAdmin()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to get admin user: %w\", err)\n\t\t}\n\t\tif err := loadRoles(admin); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn admin, nil\n\t}\n\tuser, err := op.GetUserByName(username)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"user %q not found: %w\", username, err)\n\t}\n\tif user.Disabled {\n\t\treturn nil, fmt.Errorf(\"user %q is disabled\", username)\n\t}\n\tif err := loadRoles(user); err != nil {\n\t\treturn nil, err\n\t}\n\treturn user, nil\n}\n","sourceCodeStart":155,"sourceCodeEnd":183,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/server/mcp/auth.go#L155-L183","documentation":"Error \"user %q not found: %w\" thrown in AlistGo/alist.","triggerScenarios":"Thrown at server/mcp/auth.go:173 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the referenced file/path/ID exists and is correct, then retry the operation."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}