fix:Inviting to an unsupported room version return M_BAD_JSON instead of Incompatible_Version (#1930)
fix:Inviting to an unsupported room version return M_BAD_JSON instead of Incompatible_Version (#1930)

* fix:Inviting to an unsupported room version return M_BAD_JSON instead of M_UNSUPPORTED_ROOM_VERSION

Signed-off-by: Meenal Trivedi <ccc7137f3f7e9e7e46bf7145f728a6d098d288cf@gmail.com>

* fix

Signed-off-by: Meenal Trivedi <ccc7137f3f7e9e7e46bf7145f728a6d098d288cf@gmail.com>

* fix

Signed-off-by: Meenal Trivedi <ccc7137f3f7e9e7e46bf7145f728a6d098d288cf@gmail.com>

* feat: make requested changes

Signed-off-by: Meenal Trivedi <ccc7137f3f7e9e7e46bf7145f728a6d098d288cf@gmail.com>

* Use error typecast from matrix-org/gomatrixserverlib#272

Co-authored-by: Neil Alexander <7f0e7998f0d3082a84355a2366a12924c14a9eda@users.noreply.github.com>
matrix-org/dendrite,matrix-org/dendrite,matrix-org/dendrite,matrix-org/dendrite