add more context to unknown delta log (#31943)

This commit is contained in:
Will Browne 2021-03-12 15:38:23 +01:00 committed by GitHub
parent 91dde5c980
commit 9454a4e125
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -310,7 +310,7 @@ func (f *JSONFormatter) processItem(value interface{}, deltas []diff.Delta, posi
f.printRecursive(positionStr, matchedDelta.Value, ChangeDeleted)
default:
return errors.New("unknown Delta type detected")
return fmt.Errorf("unknown Delta type detected %#v", matchedDelta)
}
}
} else {