Wrap error from SnapshotNIDFromEventID

This commit is contained in:
Neil Alexander 2022-07-05 15:06:10 +01:00
parent d4341a2d97
commit c0f824d437
No known key found for this signature in database
GPG Key ID: A02A2019A2BB0944

View File

@ -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)