From 165cc5ef1b501f225f304976adcfc6902c273fba Mon Sep 17 00:00:00 2001 From: Chris Marchesi Date: Thu, 4 Nov 2021 17:09:32 -0700 Subject: [PATCH] fix ineffectual assignment to err in DeleteCatalog (#1664) Was being caught by my linters. Looks like the error wasn't being checked after getCatalog. --- internal/host/plugin/repository_host_catalog.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/host/plugin/repository_host_catalog.go b/internal/host/plugin/repository_host_catalog.go index 40aa5302c..6007106d3 100644 --- a/internal/host/plugin/repository_host_catalog.go +++ b/internal/host/plugin/repository_host_catalog.go @@ -216,6 +216,10 @@ func (r *Repository) DeleteCatalog(ctx context.Context, id string, _ ...Option) return db.NoRowsAffected, errors.Wrap(ctx, err, op) } sets, _, err := r.getSets(ctx, "", c.GetPublicId()) + if err != nil { + return db.NoRowsAffected, errors.Wrap(ctx, err, op) + } + var plgSets []*pbset.HostSet for _, s := range sets { ps, err := toPluginSet(ctx, s)