From 0f7e897a0c8135d16acc2ed1d3c037547bc94e4a Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Tue, 9 Nov 2021 10:44:31 +0000 Subject: [PATCH] Don't double-wrap error --- clientapi/routing/joinroom.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clientapi/routing/joinroom.go b/clientapi/routing/joinroom.go index 8c77f749d..74b6a93ce 100644 --- a/clientapi/routing/joinroom.go +++ b/clientapi/routing/joinroom.go @@ -81,7 +81,7 @@ func JoinRoomByIDOrAlias( defer close(done) rsAPI.PerformJoin(req.Context(), &joinReq, &joinRes) if joinRes.Error != nil { - joinRes.Error.Code = roomserverAPI.PerformErrorNotAllowed + joinRes.Error.RemoteCode = http.StatusForbidden done <- joinRes.Error.JSONResponse() } else { done <- util.JSONResponse{