Team chat error codes (mpbx-chat)
Raised by the chat routes (W7-CHAT-01). Messages never contain the text of a message, a group name
or a file name; they name ids and field names at most. A room the caller is not a member of is
answered with the generic MPBX-NOT-FOUND, exactly like a room that does not exist, so a room's
existence is never revealed to outsiders. Guide: Team chat.
| Code | Kind | Meaning | What to do |
|---|---|---|---|
MPBX-CHAT-NOT-A-USER | permission_denied | The caller is not an active user of this company (a system administrator acting inside a company, an API key, or an account that was disabled). Chat is for the people of a company. | Sign in as a user of the company. |
MPBX-CHAT-USER-UNKNOWN | invalid_argument | A user named in the request does not exist in this company or is disabled. | Check the user ids. |
MPBX-CHAT-SELF | invalid_argument | A 1:1 chat needs another user. | Name a colleague. |
MPBX-CHAT-GROUP-TOO-LARGE | conflict | A group holds at most 200 members. | Create a second group. |
MPBX-CHAT-DIRECT-FIXED | conflict | A 1:1 chat cannot be renamed and has no member changes. | Create a group instead. |
MPBX-CHAT-NOT-OWNER | permission_denied | Only the owner of a group renames it or adds and removes other members. Any member may leave. | Ask the owner, or leave the group yourself. |
MPBX-CHAT-INVALID | invalid_argument | The group name, the message text, the caption or the client token is not acceptable (empty, too long, or contains control characters). | Fix the named field. A message holds up to 4000 characters, a group name up to 100. |
MPBX-CHAT-ATTACHMENT-TOO-LARGE | invalid_argument | The file is larger than the configured limit ([chat] max_attachment_bytes, 16 MiB by default). | Send a smaller file, or ask the administrator to raise the limit. |
MPBX-CHAT-ATTACHMENT-TYPE | invalid_argument | The file type is not on the allow-list, the declared content type does not match the file name, or the content is not what the name says. | Send an image, PDF, office document, text or CSV, audio, MP4 video or ZIP file. |
MPBX-CHAT-ATTACHMENT-INVALID | invalid_argument | The file is empty or has no usable file name. | Send a non-empty file with a name. |
MPBX-CHAT-ATTACHMENTS-UNAVAILABLE | unavailable | The server has no object store ([files]), so it cannot take or serve attachments. Text chat works. | Ask the administrator to configure [files]. |
MPBX-CHAT-NOT-SENDER | permission_denied | Only the sender edits a message; only its sender or the owner of the group deletes it (W10-CHAT-01). | Ask the sender, or the group owner. |
MPBX-CHAT-MESSAGE-DELETED | conflict | The message was deleted: it cannot be edited, replied to or reacted to. | Write a new message. |
MPBX-CHAT-REACTION-INVALID | invalid_argument | The reaction is empty, longer than 16 characters, has control characters or spaces, or you already put 20 different reactions on that message. | Use one emoji; remove one of your reactions first. |
MPBX-CHAT-SEARCH-INVALID | invalid_argument | The search text has no word to look for (empty, only punctuation) or is longer than 200 characters. | Type at least one word. |
MPBX-CHAT-RETENTION-INVALID | invalid_argument | The retention period must be 1 to 3650 days. | Pick a period in that range (365 days is the default). |