{"record":{"id":"bb11c213cfabebd6","repo":"multica-ai/multica","slug":"list-projects-w","errorCode":null,"errorMessage":"list projects: %w","messagePattern":"list projects: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_project.go","lineNumber":224,"sourceCode":"\tctx, cancel := cli.APIContext(context.Background())\n\tdefer cancel()\n\n\tparams := url.Values{}\n\tif client.WorkspaceID != \"\" {\n\t\tparams.Set(\"workspace_id\", client.WorkspaceID)\n\t}\n\tif v, _ := cmd.Flags().GetString(\"status\"); v != \"\" {\n\t\tparams.Set(\"status\", v)\n\t}\n\n\tpath := \"/api/projects\"\n\tif len(params) > 0 {\n\t\tpath += \"?\" + params.Encode()\n\t}\n\n\tvar result map[string]any\n\tif err := client.GetJSON(ctx, path, &result); err != nil {\n\t\treturn fmt.Errorf(\"list projects: %w\", err)\n\t}\n\n\tprojectsRaw, _ := result[\"projects\"].([]any)\n\n\toutput, _ := cmd.Flags().GetString(\"output\")\n\tif output == \"json\" {\n\t\treturn cli.PrintJSON(os.Stdout, projectsRaw)\n\t}\n\n\tfullID, _ := cmd.Flags().GetBool(\"full-id\")\n\tactors := loadActorDisplayLookup(ctx, client)\n\theaders := []string{\"ID\", \"TITLE\", \"STATUS\", \"LEAD\", \"CREATED\"}\n\trows := make([][]string, 0, len(projectsRaw))\n\tfor _, raw := range projectsRaw {\n\t\tp, ok := raw.(map[string]any)\n\t\tif !ok {\n\t\t\tcontinue\n\t\t}","sourceCodeStart":206,"sourceCodeEnd":242,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_project.go#L206-L242","documentation":"Wrap in the `multica project list` handler (cmd_project.go:224): the GET /api/projects request (with optional query params like status) via client.GetJSON failed. Covers transport errors, auth failures (401/403), server 5xx, and JSON decode failures of the expected map payload.","triggerScenarios":"GET /api/projects?status=... returning non-2xx; expired token; server not running; response shape not a JSON object (decode error).","commonSituations":"Token expired since last use; pointing at a server of an older API version; filtering by a status the server rejects; network/VPN down.","solutions":["Confirm auth: re-run login / check token validity (curl the endpoint with the same bearer token).","Verify the server is up and the URL is correct.","If a --status filter is set, make sure it is a valid server-side status (see error 575's enum).","Check server logs for 5xx details if the wrapped error shows 500."],"exampleFix":"# before\nmultica project list --status done   # may 4xx server-side or auth may be stale\n\n# after\nmultica login\nmultica project list --status completed","handlingStrategy":"retry","validationCode":"if err := pingServer(cfg.ServerURL); err != nil { return fmt.Errorf(\"server down: %w\", err) }\nif status != \"\" && !isValidProjectStatus(status) { return fmt.Errorf(\"bad filter\") }","typeGuard":null,"tryCatchPattern":"if err := listCmd.Run(); err != nil {\n    if isAuthErr(err) { relogin(); retry once }\n    if isTransient(err) { retry with backoff }\n}","preventionTips":["Health-check the server before batch CLI jobs.","Validate filter values client-side (see 575's enum) before sending.","Cache `project list --output json` output in scripts instead of re-listing repeatedly."],"tags":["cli","project","network","authentication","go"],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}