|
|
@@ -245,7 +245,7 @@ func UpdateBroadcastState(values map[string]interface{}) error {
|
|
|
}
|
|
|
if err := recursiveUpdate(field, val); err != nil {
|
|
|
mu.Unlock()
|
|
|
- return err
|
|
|
+ return fmt.Errorf("error updating field %s: %v", key, err)
|
|
|
}
|
|
|
}
|
|
|
mu.Unlock()
|
|
|
@@ -256,7 +256,7 @@ func UpdateBroadcastState(values map[string]interface{}) error {
|
|
|
// this allows us to insert stuff into nested structs/keys and not overwrite the existing contents
|
|
|
func recursiveUpdate(dst, src reflect.Value) error {
|
|
|
if !dst.CanSet() {
|
|
|
- return fmt.Errorf("field is not settable")
|
|
|
+ return fmt.Errorf("field (type: %s, kind: %s) is not settable", dst.Type(), dst.Kind())
|
|
|
}
|
|
|
// If dst is a struct and src is a map, handle them field by field
|
|
|
if dst.Kind() == reflect.Struct && src.Kind() == reflect.Map {
|