diff --git a/scale/client.go b/scale/client.go index 782aca39..e9d75173 100644 --- a/scale/client.go +++ b/scale/client.go @@ -196,7 +196,10 @@ func (c *namespacedScaleClient) Update(resource schema.GroupResource, scale *aut Body(scaleUpdateBytes). Do() if err := result.Error(); err != nil { - return nil, fmt.Errorf("could not update the scale for %s %s: %v", resource.String(), scale.Name, err) + // propagate "raw" error from the API + // this allows callers to interpret underlying Reason field + // for example: errors.IsConflict(err) + return nil, err } scaleBytes, err := result.Raw()