···142142143143 record, err := atdata.UnmarshalCBOR(recBytes)
144144 if err != nil {
145145+ // do not skip here
146146+ // we end up storing the CID but not passing the record along in the outbox
145147 ep.Logger.Error("failed to unmarshal record", "did", evt.Repo, "path", op.Path, "error", err)
146146- continue
147148 }
148149 parsed.Record = record
149150 }
···415416 }
416417 }
417418418418- for _, recEvt := range commit.ToEvts() {
419419+ for _, evt := range commit.ToEvts() {
420420+ // in the case of invalid record CBOR
421421+ if evt.Record == nil && evt.Action != "delete" {
422422+ continue
423423+ }
419424 jsonData, err := json.Marshal(&OutboxEvt{
420425 Type: "record",
421421- RecordEvt: recEvt,
426426+ RecordEvt: evt,
422427 })
423428 if err != nil {
424429 return err
425430 }
426431 outboxBatch = append(outboxBatch, &models.OutboxBuffer{
427427- Live: recEvt.Live,
432432+ Live: evt.Live,
428433 Data: string(jsonData),
429434 })
430435 }
+8-2
nexus/resync.go
···185185186186 rec, err := atdata.UnmarshalCBOR(blk.RawData())
187187 if err != nil {
188188- n.logger.Error("failed to unmarshal record", "path", recPath, "error", err)
189189- return nil
188188+ // do not fail here
189189+ // we end up storing the CID but not passing the record along in the outbox
190190+ n.logger.Error("failed to unmarshal record", "did", did, "path", recPath, "error", err)
190191 }
191192192193 evt := &RecordEvt{
···251252 Rkey: evt.Rkey,
252253 Cid: evt.Cid,
253254 })
255255+256256+ // in the case of invalid record CBOR
257257+ if evt.Record == nil && evt.Action != "delete" {
258258+ continue
259259+ }
254260255261 jsonData, err := json.Marshal(&OutboxEvt{
256262 Type: "record",