mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-08 04:32:37 +00:00
Add a strongly typed error for unrecognized kind/type/version
This commit is contained in:
@@ -115,7 +115,7 @@ func (s *Scheme) DecodeInto(data []byte, obj interface{}) error {
|
||||
} else {
|
||||
external, err := s.NewObject(dataVersion, dataKind)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to create new object of type ('%s', '%s')", dataVersion, dataKind)
|
||||
return err
|
||||
}
|
||||
// yaml is a superset of json, so we use it to decode here. That way,
|
||||
// we understand both.
|
||||
|
Reference in New Issue
Block a user