{"record":{"id":"0c98bb5ed745938f","repo":"kubernetes/kops","slug":"error-listing-ssh-keys-v","errorCode":null,"errorMessage":"error listing SSH keys: %v","messagePattern":"error listing SSH keys: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/scalewaytasks/sshkey.go","lineNumber":55,"sourceCode":"\tLifecycle          fi.Lifecycle\n\tPublicKey          *fi.Resource\n\tKeyPairFingerPrint *string\n}\n\nvar _ fi.CompareWithID = (*SSHKey)(nil)\n\nfunc (s *SSHKey) CompareWithID() *string {\n\treturn s.Name\n}\n\nfunc (s *SSHKey) Find(c *fi.CloudupContext) (*SSHKey, error) {\n\tcloud := c.T.Cloud.(scaleway.ScwCloud)\n\n\tkeysResp, err := cloud.IamService().ListSSHKeys(&iam.ListSSHKeysRequest{\n\t\tName: s.Name,\n\t}, scw.WithAllPages())\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error listing SSH keys: %v\", err)\n\t}\n\tif keysResp.TotalCount == 0 {\n\t\treturn nil, nil\n\t}\n\tif keysResp.TotalCount != 1 {\n\t\treturn nil, fmt.Errorf(\"found multiple SSH keys named %q\", *s.Name)\n\t}\n\n\tklog.V(2).Infof(\"found matching SSH key named %q\", *s.Name)\n\tk := keysResp.SSHKeys[0]\n\tsshKey := &SSHKey{\n\t\tID:                 new(k.ID),\n\t\tName:               new(k.Name),\n\t\tKeyPairFingerPrint: new(k.Fingerprint),\n\t\tLifecycle:          s.Lifecycle,\n\t}\n\n\t// Avoid spurious changes","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/scalewaytasks/sshkey.go#L37-L73","documentation":"In the SSHKey task's Find, the IAM API ListSSHKeys call (filtered by key name, all pages) failed while trying to locate the existing key pair. Note the message uses %v rather than %w, so the SDK error is stringified, not wrapped. The lookup result decides whether the key must be created.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/scalewaytasks/sshkey.go:55 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check IAM permissions for listing SSH keys","Verify credentials and connectivity to the Scaleway API","Retry the operation"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}