From d8568ebc219f24e7c6821a35030ae83f45ead80b Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Mon, 7 Feb 2022 17:28:13 +0000 Subject: [PATCH] Return the correct error --- roomserver/internal/input/input_events.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roomserver/internal/input/input_events.go b/roomserver/internal/input/input_events.go index 987b3cc42..85189e476 100644 --- a/roomserver/internal/input/input_events.go +++ b/roomserver/internal/input/input_events.go @@ -297,8 +297,8 @@ func (r *Inputer) processRoomEvent( "soft_fail": softfail, "missing_prev": missingPrev, }).Warn("Stored rejected event") - if err != nil { - return commitTransaction, types.RejectedError(err.Error()) + if rejectionErr != nil { + return commitTransaction, types.RejectedError(rejectionErr.Error()) } return commitTransaction, nil }