Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Return M_INVALID_PARAM instead of M_BAD_JSON when setting aliases #3297

Merged
merged 1 commit into from
Jan 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions clientapi/routing/directory.go
Original file line number Diff line number Diff line change
Expand Up @@ -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'"),
}
}

Expand Down Expand Up @@ -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'"),
}
}

Expand Down
Loading