Comment 6 for bug 1356500

Revision history for this message
Ian Booth (wallyworld) wrote :

The panic occurs because there is a bug in RelationSetCommand.Run().
 settings, err := r.Settings()
 for k, v := range c.Settings {
  if v != "" {
   settings.Set(k, v)
  } else {
   settings.Delete(k)
  }
 }

The error from r.Settings() is not checked.
If the error were checked, the Run() method would have returned an error instead of panicing. This would then have printed the real reason for the underlying issue rather than logging a panic.
Bug 1358585 has been raised for the fix to error checking.