{"record":{"id":"6b62443cbd50d324","repo":"plandex-ai/plandex","slug":"error-getting-default-config-v-6b6244","errorCode":null,"errorMessage":"error getting default config: %v","messagePattern":"error getting default config: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/cli/cmd/set_model.go","lineNumber":175,"sourceCode":"\tvar planConfig *shared.PlanConfig\n\n\terrCh := make(chan error, 3)\n\n\tgo func() {\n\t\tvar apiErr *shared.ApiError\n\t\tcustomModelPacks, apiErr = api.Client.ListModelPacks()\n\t\tif apiErr != nil {\n\t\t\terrCh <- fmt.Errorf(\"error getting custom model packs: %v\", apiErr.Msg)\n\t\t\treturn\n\t\t}\n\t\terrCh <- nil\n\t}()\n\n\tgo func() {\n\t\tvar apiErr *shared.ApiError\n\t\tdefaultConfig, apiErr = api.Client.GetDefaultPlanConfig()\n\t\tif apiErr != nil {\n\t\t\terrCh <- fmt.Errorf(\"error getting default config: %v\", apiErr.Msg)\n\t\t\treturn\n\t\t}\n\n\t\terrCh <- nil\n\t}()\n\n\tgo func() {\n\t\tif lib.CurrentPlanId != \"\" {\n\t\t\tvar apiErr *shared.ApiError\n\t\t\tplanConfig, apiErr = api.Client.GetPlanConfig(lib.CurrentPlanId)\n\t\t\tif apiErr != nil {\n\t\t\t\terrCh <- fmt.Errorf(\"error getting plan config: %v\", apiErr.Msg)\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t\terrCh <- nil\n\t}()\n","sourceCodeStart":157,"sourceCodeEnd":193,"githubUrl":"https://github.com/plandex-ai/plandex/blob/e2d772072efadbe41d2946d97d79be55532dbab5/app/cli/cmd/set_model.go#L157-L193","documentation":"This error wraps a failure from api.Client.GetDefaultPlanConfig() in set_model's parallel fetch. The *shared.ApiError Msg is embedded into 'error getting default config: %s'. It means the default plan configuration could not be retrieved, blocking model/config setup.","triggerScenarios":"GetDefaultPlanConfig() returning non-nil *shared.ApiError: expired/invalid credentials, transient network error, or a server-side failure (5xx) while serving the default config.","commonSituations":"API version drift where the default-config endpoint changed; token expired mid-session; temporary server incident; corporate proxy interference.","solutions":["Retry the command — default-config fetches are often transiently failing","Re-authenticate if err.Msg indicates 401/403","Check service status / err.Msg for 5xx and wait or report if server-side","Verify network and proxy reachability to the API"],"exampleFix":"// before\nerrCh <- fmt.Errorf(\"error getting default config: %v\", apiErr.Msg)\n// after\nerrCh <- fmt.Errorf(\"error getting default config: %v\", apiErr.Msg)\n// plus retry in caller:\nfor i := 0; i < 3; i++ {\n\tif err := fetch(); err == nil { break }\n\ttime.Sleep(time.Second * time.Duration(i+1))\n}","handlingStrategy":"retry","validationCode":"// pre-flight: verify API reachability and auth before fetching default config\nif api.Client == nil || api.Client.Token == \"\" {\n\treturn fmt.Errorf(\"not authenticated\")\n}","typeGuard":"func isApiError(err error) (*shared.ApiError, bool) {\n\tae, ok := err.(*shared.ApiError)\n\treturn ae, ok\n}","tryCatchPattern":"cfg, err := api.Client.GetDefaultPlanConfig()\nif err != nil {\n\tif ae, ok := err.(*shared.ApiError); ok {\n\t\tif ae.Status >= 500 {\n\t\t\tcfg, err = retryWithBackoff(3, api.Client.GetDefaultPlanConfig)\n\t\t}\n\t}\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error getting default config: %w\", err)\n\t}\n}","preventionTips":["Retry 5xx errors with backoff — default-config failures are often transient","Re-authenticate on 401/403 responses","Check service status pages during incidents","Pin/verify CLI and API versions to avoid endpoint drift"],"tags":["go","cli","api","network"],"backgroundTag":"api-request-failed","analyzedSha":"e2d772072efadbe41d2946d97d79be55532dbab5","analyzedAt":"2026-09-05T20:56:53.631Z","contentChangedAt":"2026-09-05T20:56:53.631Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}