Commit a1f5955a authored by Matt Butcher's avatar Matt Butcher

fix(tiller): fix nil pointers in error messages

There were a few places where error messages were accessing properties
of objects that were nil because of the error.

Closes #1374
parent d744a3d0
......@@ -100,7 +100,7 @@ func (cfgmaps *ConfigMaps) List(filter func(*rspb.Release) bool) ([]*rspb.Releas
for _, item := range list.Items {
rls, err := decodeRelease(item.Data["release"])
if err != nil {
logerrf(err, "list: failed to decode release: %s", rls)
logerrf(err, "list: failed to decode release: %v", item)
continue
}
if filter(rls) {
......@@ -201,7 +201,7 @@ func (cfgmaps *ConfigMaps) Delete(key string) (rls *rspb.Release, err error) {
return nil, ErrReleaseNotFound
}
logerrf(err, "delete: failed to get release %q", rls.Name)
logerrf(err, "delete: failed to get release %q", key)
return nil, err
}
// delete the release
......
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