{"record":{"id":"a463a10d68b1844a","repo":"Netflix/chaosmonkey","slug":"the-account-name-doesn-t-exist","errorCode":null,"errorMessage":"the account name doesn't exist","messagePattern":"the account name doesn't exist","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"spinnaker/spinnaker.go","lineNumber":548,"sourceCode":"\tstatusKO := resp.StatusCode != http.StatusOK\n\n\t// Finally find account\n\tfor _, a := range accounts {\n\t\tif a.Name != name {\n\t\t\tcontinue\n\t\t}\n\t\tif statusKO {\n\t\t\tif a.Error == \"\" {\n\t\t\t\treturn ac, errors.Errorf(\"unexpected status code: %d. body: %s\", resp.StatusCode, body)\n\t\t\t}\n\n\t\t\treturn ac, errors.Errorf(\"unexpected status code: %d. error: %s\", resp.StatusCode, a.Error)\n\t\t}\n\n\t\treturn a, nil\n\t}\n\n\treturn ac, errors.New(\"the account name doesn't exist\")\n}\n\n// GetClusterNames returns a list of cluster names for an app\nfunc (s Spinnaker) GetClusterNames(app string, account D.AccountName) (clusters []D.ClusterName, err error) {\n\turl := s.appURL(app)\n\tresp, err := s.client.Get(url)\n\tif err != nil {\n\t\treturn nil, errors.Wrapf(err, \"http get failed at %s\", url)\n\t}\n\n\tdefer func() {\n\t\tif cerr := resp.Body.Close(); cerr != nil && err == nil {\n\t\t\terr = errors.Wrapf(err, \"body close failed at %s\", url)\n\t\t}\n\t}()\n\n\tif resp.StatusCode != http.StatusOK {\n\t\treturn nil, errors.Errorf(\"unexpected response code (%d) from %s\", resp.StatusCode, url)","sourceCodeStart":530,"sourceCodeEnd":566,"githubUrl":"https://github.com/Netflix/chaosmonkey/blob/eaa28fb761c0ebe8644d1333e5d164e9cc3071e9/spinnaker/spinnaker.go#L530-L566","documentation":"account() looks up a named account from the Spinnaker accounts list and returns this sentinel error when no account in the response matches the requested name. It means Spinnaker does not know the account name Chaos Monkey asked for.","triggerScenarios":"Calling account(name) (e.g. via CloudProvider -> GetApp) where the HTTP request succeeds and the account list parses fine, but none of the returned accounts' name field equals the requested name.","commonSituations":"Typo or case mismatch between the account name in chaosmonkey config and the name registered in Spinnaker; account removed/renamed in Spinnaker (clouddriver config) while chaosmonkey still references it; chaosmonkey pointed at the wrong Spinnaker endpoint that lacks the account.","solutions":["List accounts from Spinnaker (GET <endpoint>/accounts) and confirm the exact spelling/case of the account name","Update chaosmonkey's config (enabled accounts) to use names that exist in Spinnaker","Re-add or rename the account in the Spinnaker/clouddriver configuration if it was deleted or renamed","Verify chaosmonkey is pointed at the intended Spinnaker endpoint"],"exampleFix":"// before (chaosmonkey config)\nchaosmonkey:\n  accounts: [prod, test, staging]\n// after (only accounts that exist in Spinnaker)\nchaosmonkey:\n  accounts: [prod, test]","handlingStrategy":"validation","validationCode":"// Pre-validate account names against Spinnaker's account list:\nfunc accountExists(endpoint, clientCert, name string) (bool, error) {\n\tresp, err := http.Get(endpoint + \"/accounts\")\n\tif err != nil { return false, err }\n\tvar accounts []struct{ Name string `json:\"name\"` }\n\tif err := json.NewDecoder(resp.Body).Decode(&accounts); err != nil { return false, err }\n\tfor _, a := range accounts {\n\t\tif a.Name == name { return true, nil }\n\t}\n\treturn false, nil\n}","typeGuard":null,"tryCatchPattern":"provider, err := spin.CloudProvider(app)\nif err != nil {\n\tif strings.Contains(err.Error(), \"account name doesn't exist\") {\n\t\tlog.Printf(\"account missing in Spinnaker, skipping %s\", app)\n\t\treturn nil\n\t}\n\treturn err\n}","preventionTips":["Keep chaosmonkey's account list in sync with clouddriver config","Use exact case-sensitive account names","Re-validate config after renaming/removing accounts in Spinnaker","Point chaosmonkey at the correct Spinnaker endpoint"],"tags":["spinnaker","configuration","account"],"backgroundTag":"unknown-account-name","analyzedSha":"eaa28fb761c0ebe8644d1333e5d164e9cc3071e9","analyzedAt":"2026-09-03T17:04:39.020Z","contentChangedAt":"2026-09-03T17:04:39.020Z","schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}