From 6c8489e4ab1477da1fb49b3bde73720f6092d209 Mon Sep 17 00:00:00 2001 From: "Gabriela S. Soria" Date: Wed, 4 Oct 2023 18:37:29 +0000 Subject: [PATCH] Remove unnecessary validation Signed-off-by: Gabriela S. Soria --- resources/codebuild-source-credentials.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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,