quick logging fixes (#3624)

Co-authored-by: aviator-app[bot] <48659329+aviator-app[bot]@users.noreply.github.com>
This commit is contained in:
Keepers 2023-06-15 10:38:55 -06:00 committed by GitHub
parent 46eedc0ad1
commit 49903a11ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -744,10 +744,10 @@ func serialize(t *testing.T, item serialization.Parsable) []byte {
return byteArray
}
func hydrateMessage(byteArray []byte) (models.Messageable, error) {
parseNode, err := kjson.NewJsonParseNodeFactory().GetRootParseNode("application/json", byteArray)
func hydrateMessage(body []byte) (models.Messageable, error) {
parseNode, err := kjson.NewJsonParseNodeFactory().GetRootParseNode("application/json", body)
if err != nil {
return nil, clues.Wrap(err, "deserializing bytes into base m365 object")
return nil, clues.Wrap(err, "deserializing bytes into base m365 object").With("body_size", len(body))
}
anObject, err := parseNode.GetObjectValue(models.CreateMessageFromDiscriminatorValue)

View File

@ -174,7 +174,7 @@ func restoreCollection(
info, err := ir.restore(ictx, body, userID, destinationID, errs)
if err != nil {
el.AddRecoverable(ctx, err)
el.AddRecoverable(ictx, err)
continue
}

View File

@ -13,7 +13,7 @@ func createFromBytes(
) (serialization.Parsable, error) {
parseNode, err := kjson.NewJsonParseNodeFactory().GetRootParseNode("application/json", bytes)
if err != nil {
return nil, clues.Wrap(err, "deserializing bytes into base m365 object")
return nil, clues.Wrap(err, "deserializing bytes into base m365 object").With("bytes_len", len(bytes))
}
v, err := parseNode.GetObjectValue(createFunc)