Return the correct error

This commit is contained in:
Neil Alexander 2022-02-07 17:28:13 +00:00
parent ef01fca01d
commit d8568ebc21
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

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