Don't panic when entries can't be found

This commit is contained in:
Neil Alexander 2022-05-31 16:19:04 +01:00
parent b6a73aefbf
commit 8034de544b
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -884,7 +884,7 @@ func (v *StateResolution) resolveConflictsV2(
for _, resolvedEvent := range resolvedEvents {
entry, ok := eventIDMap[resolvedEvent.EventID()]
if !ok {
panic(fmt.Errorf("missing state entry for event ID %q", resolvedEvent.EventID()))
return nil, fmt.Errorf("missing state entry for event ID %q", resolvedEvent.EventID())
}
notConflicted = append(notConflicted, entry)
}