Skip to content

Commit 3d5810a

Browse files
committed
add res nil check
1 parent 815ff27 commit 3d5810a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/customclient/client.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ func (c *Client) ListEnterpriseConsumedLicenses(ctx context.Context, enterprise
4141
)
4242

4343
if err != nil {
44-
logBody(ctx, res.Body)
44+
if res != nil {
45+
logBody(ctx, res.Body)
46+
}
4547
return nil, &rateLimitData, fmt.Errorf("error listing enterprise consumed licenses: %w", err)
4648
}
4749

0 commit comments

Comments
 (0)