Skip to content

Commit

Permalink
Merge pull request #122569 from IvoGoman/wrap-nomatcherror
Browse files Browse the repository at this point in the history
feat(cli-runtime): wrap meta.NoKindMatchErrors

Kubernetes-commit: 2a44cb0ab352f97c419b31b592def50b4e98bc56
  • Loading branch information
k8s-publishing-bot committed Feb 24, 2024
2 parents 7fda3cb + b9cc986 commit c66e3bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 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 c66e3bf

Please sign in to comment.