diff --git a/resources/codebuild-source-credentials.go b/resources/codebuild-source-credentials.go index ff2c0d671..d2d742800 100644 --- a/resources/codebuild-source-credentials.go +++ b/resources/codebuild-source-credentials.go @@ -24,14 +24,11 @@ func ListCodeBuildSourceCredential(sess *session.Session) ([]Resource, error) { params := &codebuild.ListSourceCredentialsInput{} resp, err := svc.ListSourceCredentials(params) + if err != nil { return nil, err } - if resp == nil { - return nil, nil - } - for _, credential := range resp.SourceCredentialsInfos { resources = append(resources, &CodeBuildSourceCredential{ svc: svc,