Don't wrap errors

This commit is contained in:
Neil Alexander 2022-08-17 10:42:32 +01:00
parent 605d57a24f
commit 4baca2c2a8
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -88,17 +88,14 @@ func (r *Queryer) QueryStateAfterEvents(
stateEntries, err = roomState.LoadCombinedStateAfterEvents(
ctx, prevStates,
)
if err != nil {
return fmt.Errorf("roomState.LoadCombinedStateAfterEvents: %w", err)
}
} else {
// Look up the current state for the requested tuples.
stateEntries, err = roomState.LoadStateAfterEventsForStringTuples(
ctx, prevStates, request.StateToFetch,
)
if err != nil {
return fmt.Errorf("roomState.LoadStateAfterEventsForStringTuples: %w", err)
}
}
if err != nil {
return err
}
stateEvents, err := helpers.LoadStateEvents(ctx, r.DB, stateEntries)