Check for IncompatibleRoomVersionError in make join response

This commit is contained in:
Devon Hudson 2023-05-12 18:51:34 -06:00
parent f97152f479
commit faa0aa0744
No known key found for this signature in database
GPG key ID: CD06B18E77F6A628

View file

@ -172,14 +172,18 @@ func MakeJoin(
code = http.StatusBadRequest
case spec.ErrorBadJSON:
code = http.StatusBadRequest
case spec.ErrorIncompatibleRoomVersion:
code = http.StatusBadRequest
}
return util.JSONResponse{
Code: code,
JSON: e,
}
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{