diff --git a/federationapi/routing/join.go b/federationapi/routing/join.go index 739610fe5..7dde70306 100644 --- a/federationapi/routing/join.go +++ b/federationapi/routing/join.go @@ -172,19 +172,14 @@ func MakeJoin( code = http.StatusBadRequest case spec.ErrorBadJSON: code = http.StatusBadRequest + case spec.ErrorIncompatibleRoomVersion: + code = http.StatusBadRequest } return util.JSONResponse{ Code: code, JSON: e, } - // TODO: MatrixError & the other error types - case spec.IncompatibleRoomVersionError: - util.GetLogger(httpReq.Context()).WithError(internalErr) - return util.JSONResponse{ - Code: http.StatusBadRequest, - JSON: e, - } default: util.GetLogger(httpReq.Context()).WithError(internalErr) return util.JSONResponse{ diff --git a/go.mod b/go.mod index 687e0d16f..ede5bd5e3 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( github.com/matrix-org/dugong v0.0.0-20210921133753-66e6b1c67e2e github.com/matrix-org/go-sqlite3-js v0.0.0-20220419092513-28aa791a1c91 github.com/matrix-org/gomatrix v0.0.0-20220926102614-ceba4d9f7530 - github.com/matrix-org/gomatrixserverlib v0.0.0-20230513002144-a748efca5393 + github.com/matrix-org/gomatrixserverlib v0.0.0-20230513003120-2bffcdd97b5a github.com/matrix-org/pinecone v0.11.1-0.20230210171230-8c3b24f2649a github.com/matrix-org/util v0.0.0-20221111132719-399730281e66 github.com/mattn/go-sqlite3 v1.14.16 diff --git a/go.sum b/go.sum index ca513fe5c..5aacdbdd2 100644 --- a/go.sum +++ b/go.sum @@ -323,8 +323,8 @@ github.com/matrix-org/go-sqlite3-js v0.0.0-20220419092513-28aa791a1c91 h1:s7fexw github.com/matrix-org/go-sqlite3-js v0.0.0-20220419092513-28aa791a1c91/go.mod h1:e+cg2q7C7yE5QnAXgzo512tgFh1RbQLC0+jozuegKgo= github.com/matrix-org/gomatrix v0.0.0-20220926102614-ceba4d9f7530 h1:kHKxCOLcHH8r4Fzarl4+Y3K5hjothkVW5z7T1dUM11U= github.com/matrix-org/gomatrix v0.0.0-20220926102614-ceba4d9f7530/go.mod h1:/gBX06Kw0exX1HrwmoBibFA98yBk/jxKpGVeyQbff+s= -github.com/matrix-org/gomatrixserverlib v0.0.0-20230513002144-a748efca5393 h1:PwGusZQibCYE0PPcAtHJ839Z4ycyX/nD9GNC9dpJesM= -github.com/matrix-org/gomatrixserverlib v0.0.0-20230513002144-a748efca5393/go.mod h1:H9V9N3Uqn1bBJqYJNGK1noqtgJTaCEhtTdcH/mp50uU= +github.com/matrix-org/gomatrixserverlib v0.0.0-20230513003120-2bffcdd97b5a h1:e8EZVUIQkElUWUiheuyWNzEjONXsPysta3kGG3qMWk8= +github.com/matrix-org/gomatrixserverlib v0.0.0-20230513003120-2bffcdd97b5a/go.mod h1:H9V9N3Uqn1bBJqYJNGK1noqtgJTaCEhtTdcH/mp50uU= github.com/matrix-org/pinecone v0.11.1-0.20230210171230-8c3b24f2649a h1:awrPDf9LEFySxTLKYBMCiObelNx/cBuv/wzllvCCH3A= github.com/matrix-org/pinecone v0.11.1-0.20230210171230-8c3b24f2649a/go.mod h1:HchJX9oKMXaT2xYFs0Ha/6Zs06mxLU8k6F1ODnrGkeQ= github.com/matrix-org/util v0.0.0-20221111132719-399730281e66 h1:6z4KxomXSIGWqhHcfzExgkH3Z3UkIXry4ibJS4Aqz2Y=