Skip to content

Commit

Permalink
Merge pull request kubernetes#122569 from IvoGoman/wrap-nomatcherror
Browse files Browse the repository at this point in the history
feat(cli-runtime): wrap meta.NoKindMatchErrors
  • Loading branch information
k8s-ci-robot committed Feb 24, 2024
2 parents 4c15f5f + e821e0d commit 2a44cb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion staging/src/k8s.io/cli-runtime/pkg/resource/mapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func (m *mapper) infoForData(data []byte, source string) (*Info, error) {
mapping, err := restMapper.RESTMapping(gvk.GroupKind(), gvk.Version)
if err != nil {
if _, ok := err.(*meta.NoKindMatchError); ok {
return nil, fmt.Errorf("resource mapping not found for name: %q namespace: %q from %q: %v\nensure CRDs are installed first",
return nil, fmt.Errorf("resource mapping not found for name: %q namespace: %q from %q: %w\nensure CRDs are installed first",
name, namespace, source, err)
}
return nil, fmt.Errorf("unable to recognize %q: %v", source, err)
Expand Down

0 comments on commit 2a44cb0

Please sign in to comment.