Skip to content

Commit

Permalink
handle error (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
yalosev authored Nov 3, 2023
1 parent 40ba33d commit ba2fc85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ func getInClusterConfig() (config *rest.Config, defaultNs string, err error) {
func (c *Client) APIResourceList(apiVersion string) (lists []*metav1.APIResourceList, err error) {
lists, err = c.apiResourceList(apiVersion)
if err != nil {
if errors.Cause(err).Error() == "not found" {
if strings.Contains(err.Error(), "not found") {
// *errors.errorString type is here, we can't check it another way
c.cachedDiscovery.Invalidate()
return c.apiResourceList(apiVersion)
Expand Down

0 comments on commit ba2fc85

Please sign in to comment.