Return M_INVALID_PARAM instead of M_BAD_JSON

This commit is contained in:
Till Faelligen 2024-01-09 19:38:10 +01:00
parent 13c5173273
commit f5bb010afc
No known key found for this signature in database
GPG key ID: 3DF82D8AB9211D4E

View file

@ -55,7 +55,7 @@ func DirectoryRoom(
if err != nil {
return util.JSONResponse{
Code: http.StatusBadRequest,
JSON: spec.BadJSON("Room alias must be in the form '#localpart:domain'"),
JSON: spec.InvalidParam("Room alias must be in the form '#localpart:domain'"),
}
}
@ -134,7 +134,7 @@ func SetLocalAlias(
if err != nil {
return util.JSONResponse{
Code: http.StatusBadRequest,
JSON: spec.BadJSON("Room alias must be in the form '#localpart:domain'"),
JSON: spec.InvalidParam("Room alias must be in the form '#localpart:domain'"),
}
}