Skip to content

Commit cbdc4da

Browse files
committed
Log decodeMutation errors
1 parent 7eccb9c commit cbdc4da

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

appstate/decode.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,12 +204,22 @@ func (proc *Processor) decodeMutations(
204204
for i, mutation := range mutations {
205205
indexMAC, valueMAC, index, syncAction, _, err := proc.decodeMutation(ctx, mutation, i, validateMACs)
206206
if err != nil {
207+
if !validateMACs {
208+
zerolog.Ctx(ctx).Debug().
209+
Str("patch_name", string(name)).
210+
Uint64("patch_version", patchVersion).
211+
Int("mutation_index", i).
212+
Hex("key_id", mutation.GetRecord().GetKeyID().GetID()).
213+
Err(err).
214+
Msg("DEBUG: mutation failed to decode")
215+
}
207216
return err
208217
}
209218
if !validateMACs {
210219
zerolog.Ctx(ctx).Debug().
211220
Str("patch_name", string(name)).
212221
Uint64("patch_version", patchVersion).
222+
Int("mutation_index", i).
213223
Hex("key_id", mutation.GetRecord().GetKeyID().GetID()).
214224
Hex("index_mac", indexMAC).
215225
Hex("value_mac", valueMAC).

0 commit comments

Comments
 (0)