From f54689f86253b8f3712ee0ae93f49d7366e7b095 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Tue, 21 Jul 2020 17:21:48 +0100 Subject: [PATCH] Fix lint error --- roomserver/storage/shared/storage.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/roomserver/storage/shared/storage.go b/roomserver/storage/shared/storage.go index e858a9b0..5494e465 100644 --- a/roomserver/storage/shared/storage.go +++ b/roomserver/storage/shared/storage.go @@ -412,12 +412,9 @@ func (d *Database) StoreEvent( if err == sql.ErrNoRows { // We've already inserted the event so select the numeric event ID eventNID, stateNID, err = d.EventsTable.SelectEvent(ctx, txn, event.EventID()) - if err != nil { - return fmt.Errorf("d.EventsTable.SelectEvent: %w", err) - } } if err != nil { - return fmt.Errorf("d.EventsTable.InsertEvent: %w", err) + return err } }