{"record":{"id":"a24b036929658648","repo":"multica-ai/multica","slug":"fetch-squads-w","errorCode":null,"errorMessage":"fetch squads: %w","messagePattern":"fetch squads: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_issue.go","lineNumber":2637,"sourceCode":"\t\t} else {\n\t\t\tfor _, a := range agents {\n\t\t\t\tclassify(\"agent\", strVal(a, \"id\"), strVal(a, \"name\"))\n\t\t\t}\n\t\t}\n\t}\n\n\t// Search squads. The platform allows issues to be assigned to a squad\n\t// (the leader agent then coordinates delegation), so squad names must\n\t// resolve here too for issue-assignee callers — otherwise a user saying\n\t// \"assign to <SquadName>\" silently falls through and the autopilot\n\t// prompt emits \"Unrecognized assignee: <SquadName>\" (MUL-2165). Callers\n\t// whose target schema is member-or-agent only (project lead, subscriber)\n\t// must opt out via `kinds.squad = false`.\n\tif kinds.squad {\n\t\tfetchAttempts++\n\t\tvar squads []map[string]any\n\t\tif err := getAssigneeJSON(ctx, client, \"/api/squads\", &squads); err != nil {\n\t\t\terrs = append(errs, fmt.Errorf(\"fetch squads: %w\", err))\n\t\t} else {\n\t\t\tfor _, s := range squads {\n\t\t\t\tif strVal(s, \"archived_at\") != \"\" {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tclassify(\"squad\", strVal(s, \"id\"), strVal(s, \"name\"))\n\t\t\t}\n\t\t}\n\t}\n\n\t// If every fetch failed, report the errors instead of a misleading \"not found\".\n\tif fetchAttempts > 0 && len(errs) == fetchAttempts {\n\t\tmsgs := make([]string, len(errs))\n\t\tfor i, e := range errs {\n\t\t\tmsgs[i] = e.Error()\n\t\t}\n\t\treturn \"\", \"\", fmt.Errorf(\"failed to resolve assignee: %s\", strings.Join(msgs, \"; \"))\n\t}","sourceCodeStart":2619,"sourceCodeEnd":2655,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_issue.go#L2619-L2655","documentation":"Error \"fetch squads: %w\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/cmd/multica/cmd_issue.go:2637 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check server connectivity and retry fetching squads."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}