Skip to content

Commit

Permalink
Don't drop unknown events in default syncer
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Dec 2, 2023
1 parent 4784d6d commit 5fae501
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,10 @@ func NewDefaultSyncer() *DefaultSyncer {
globalListeners: []EventHandler{},
ParseEventContent: true,
ParseErrorHandler: func(evt *event.Event, err error) bool {
return false
// By default, drop known events that can't be parsed, but let unknown events through
return errors.Is(err, event.ErrUnsupportedContentType) ||
// Also allow events that had their content already parsed by some other function
errors.Is(err, event.ErrContentAlreadyParsed)
},
}
}
Expand Down

0 comments on commit 5fae501

Please sign in to comment.