mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Provide resource version in error if available
This commit is contained in:
parent
f978c4cab5
commit
6459b61bca
@ -124,6 +124,11 @@ func (s *store) Get(ctx context.Context, key string, resourceVersion string, out
|
||||
if ignoreNotFound {
|
||||
return runtime.SetZeroValue(out)
|
||||
}
|
||||
if len(resourceVersion) > 0 {
|
||||
if rv, err := s.versioner.ParseResourceVersion(resourceVersion); err == nil {
|
||||
return storage.NewKeyNotFoundError(key, int64(rv))
|
||||
}
|
||||
}
|
||||
return storage.NewKeyNotFoundError(key, 0)
|
||||
}
|
||||
kv := getResp.Kvs[0]
|
||||
|
Loading…
Reference in New Issue
Block a user