Commit d477fe6b authored by Abhi Shah's avatar Abhi Shah

Merge pull request #9569 from jhadvig/unclear_error

Make error msg for updating resource version more clear
parents a1840218 90dcd347
...@@ -301,7 +301,7 @@ func (e *Etcd) Update(ctx api.Context, obj runtime.Object) (runtime.Object, bool ...@@ -301,7 +301,7 @@ func (e *Etcd) Update(ctx api.Context, obj runtime.Object) (runtime.Object, bool
} }
if newVersion != version { if newVersion != version {
// TODO: return the most recent version to a client? // TODO: return the most recent version to a client?
return nil, nil, kubeerr.NewConflict(e.EndpointName, name, fmt.Errorf("the resource was updated to %d", version)) return nil, nil, kubeerr.NewConflict(e.EndpointName, name, fmt.Errorf("another client made an update to this object in resource version %d", version))
} }
if err := rest.BeforeUpdate(e.UpdateStrategy, ctx, obj, existing); err != nil { if err := rest.BeforeUpdate(e.UpdateStrategy, ctx, obj, existing); err != nil {
return nil, nil, err return nil, nil, err
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment