From c0f824d4375493127799eb3c3ecf0327838813d6 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Tue, 5 Jul 2022 15:06:10 +0100 Subject: [PATCH] Wrap error from `SnapshotNIDFromEventID` --- roomserver/state/state.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roomserver/state/state.go b/roomserver/state/state.go index 6c4e4b86..91f27165 100644 --- a/roomserver/state/state.go +++ b/roomserver/state/state.go @@ -110,7 +110,7 @@ func (v *StateResolution) LoadStateAtEvent( snapshotNID, err := v.db.SnapshotNIDFromEventID(ctx, eventID) if err != nil { - return nil, fmt.Errorf("LoadStateAtEvent.SnapshotNIDFromEventID failed for event %s : %s", eventID, err) + return nil, fmt.Errorf("LoadStateAtEvent.SnapshotNIDFromEventID failed for event %s : %w", eventID, err) } if snapshotNID == 0 { return nil, fmt.Errorf("LoadStateAtEvent.SnapshotNIDFromEventID(%s) returned 0 NID, was this event stored?", eventID)