Skip to content

Commit

Permalink
chore: export no resources found error
Browse files Browse the repository at this point in the history
  • Loading branch information
yashmehrotra committed Jun 22, 2024
1 parent d1dfc11 commit a605c50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import (
"k8s.io/klog/v2"
)

var errEmpty = errors.New("no resources found")
var ErrEmpty = errors.New("no resources found")

// groupResource contains the APIGroup and APIResource
type groupResource struct {
Expand Down Expand Up @@ -210,7 +210,7 @@ func fetchResourcesIncremental(ctx context.Context, ketalloptions *options.Ketal

if len(ret) == 0 {
klog.Warningf("No resources found, are you authorized? Try to narrow the scope with --namespace.")
return nil, errEmpty
return nil, ErrEmpty
}

return util.ToV1List(ret), nil
Expand Down

0 comments on commit a605c50

Please sign in to comment.