mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-14 01:23:10 -06:00
Check for IncompatibleRoomVersionError in make join response
This commit is contained in:
parent
f97152f479
commit
faa0aa0744
|
|
@ -172,14 +172,18 @@ func MakeJoin(
|
||||||
code = http.StatusBadRequest
|
code = http.StatusBadRequest
|
||||||
case spec.ErrorBadJSON:
|
case spec.ErrorBadJSON:
|
||||||
code = http.StatusBadRequest
|
code = http.StatusBadRequest
|
||||||
case spec.ErrorIncompatibleRoomVersion:
|
|
||||||
code = http.StatusBadRequest
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return util.JSONResponse{
|
return util.JSONResponse{
|
||||||
Code: code,
|
Code: code,
|
||||||
JSON: e,
|
JSON: e,
|
||||||
}
|
}
|
||||||
|
case spec.IncompatibleRoomVersionError:
|
||||||
|
util.GetLogger(httpReq.Context()).WithError(internalErr)
|
||||||
|
return util.JSONResponse{
|
||||||
|
Code: http.StatusBadRequest,
|
||||||
|
JSON: e,
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
util.GetLogger(httpReq.Context()).WithError(internalErr)
|
util.GetLogger(httpReq.Context()).WithError(internalErr)
|
||||||
return util.JSONResponse{
|
return util.JSONResponse{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue