Flatten error on r.Queryer.QueryStateAfterEvents

This commit is contained in:
Neil Alexander 2022-08-17 14:04:00 +01:00
parent cded673af7
commit 824841b765
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -72,13 +72,7 @@ func (r *Queryer) QueryStateAfterEvents(
prevStates, err := r.DB.StateAtEventIDs(ctx, request.PrevEventIDs)
if err != nil {
switch err.(type) {
case types.MissingEventError:
util.GetLogger(ctx).Errorf("QueryStateAfterEvents: MissingEventError: %s", err)
return nil
default:
return fmt.Errorf("r.DB.StateAtEventIDs: %w", err)
}
return nil
}
response.PrevEventsExist = true