mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 03:03:59 +00:00
Merge pull request #122569 from IvoGoman/wrap-nomatcherror
feat(cli-runtime): wrap meta.NoKindMatchErrors
This commit is contained in:
commit
2a44cb0ab3
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user