This error message is not always helpful when part of the data path is null.
We should check for null and provide a more descriptive message.
|
return nil, errors.New(fmt.Sprintf("Part of data path: %s is not a nested object! dataPath: %s", part, dataPath)) |