mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
Check json format firstly
Check json format firstly check json format firstly check json format firstly
This commit is contained in:
parent
efb42b302d
commit
d36173e855
@ -59,7 +59,7 @@ func (SimpleMetaFactory) Interpret(data []byte) (version, kind string, err error
|
||||
}{}
|
||||
err = json.Unmarshal(data, &findKind)
|
||||
if err != nil {
|
||||
return "", "", fmt.Errorf("couldn't get version/kind: %v", err)
|
||||
return "", "", fmt.Errorf("couldn't get version/kind; json parse error: %v", err)
|
||||
}
|
||||
return findKind.APIVersion, findKind.Kind, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user