MM-63619: improve Groups API error semantics (#30961)

Instead of 5xx errors, return `http.StatusInvalidRequest` when
adding or deleting invalid user ids from groups.

Fixes: https://mattermost.atlassian.net/browse/MM-63619
Этот коммит содержится в:
Jesse Hallam
2025-05-14 10:17:30 -03:00
коммит произвёл GitHub
родитель 935b8902a8
Коммит d80d575f6c
4 изменённых файлов: 277 добавлений и 106 удалений

Просмотреть файл

@@ -5370,6 +5370,10 @@
"id": "app.group.uniqueness_error",
"translation": "group member already exists"
},
{
"id": "app.group.user_not_found",
"translation": "Error updating group. User with username \"{{.Username}}\" could not be found."
},
{
"id": "app.group.username_conflict",
"translation": "user with username \"{{.Username}}\" already exists."