Skip to content
Merged
Show file tree
Hide file tree
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 articles/error-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ description: "Common error codes and their descriptions for CometChat REST APIs.
| **Message Errors** | |
| `ERR_EMPTY_RECEIVER` | Indicates that the receiver cannot be empty. |
| `ERR_INVALID_RECEIVER_TYPE` | Indicates that the invalid receiver type. |
| `ERR_CONVERSATION_NOT_FOUND` | Indicates that the conversation id does not exists. |
| `ERR_CONVERSATION_NOT_ACCESSIBLE` | Indicates that the conversation id not accessible to the user. 1. A user can access his own one-to-one conversations. 2. A user can access the group conversations if he is member of the group. |
| `ERR_CONVERSATION_NOT_FOUND` | Indicates that the conversation id does not exists. This error code applies only to the deprecated `getConversation` and `deleteConversation` APIs. |
| `ERR_CONVERSATION_NOT_ACCESSIBLE` | Indicates that the conversation id not accessible to the user. 1. A user can access his own one-to-one conversations. 2. A user can access the group conversations if he is member of the group. This error is also thrown when the conversation has no messages yet, as the conversation has not been created on CometChat. |
| `ERR_USER_MESSAGE_DELETE_FAILED` | Indicates that the API has failed to delete a one-to-one message. |
| `ERR_MESSAGE_ID_NOT_FOUND` | Indicates that the message does not exist. |
| `ERR_INVALID_MESSAGE_DATA` | Indicates invalid message body. |
Expand Down
6 changes: 3 additions & 3 deletions fundamentals/notification-extensions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ CometChat Notifications come in two variants:

2. The Legacy Notification Extensions based on CometChat Extensions.

* [Legacy Push Notifications Extension](/notifications/web-push-notifications)
* [Legacy Email Notifications Extension](/notifications/email-notifications-extension-legacy)
* [Legacy SMS Notifications Extension](/notifications/sms-notifications-extension-legacy)
* [Legacy Push Notifications Extension](https://assets.cometchat.io/legacy-docs/notifications/push-notifications-extension-legacy.html)
* [Legacy Email Notifications Extension](https://assets.cometchat.io/legacy-docs/notifications/email-notifications-extension-legacy.html)
* [Legacy SMS Notifications Extension](https://assets.cometchat.io/legacy-docs/notifications/sms-notifications-extension-legacy.html)

For the best experience, we recommend to use the mordern [Notifications](/notifications/overview) platform. Please visit the above mentioned links for more details.
9 changes: 5 additions & 4 deletions rest-api/conversations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,11 @@ A **Conversation** represents an ongoing message exchange between a user and ano

### Error handling

| Error Code | Description |
| ---------------------------- | ----------------------------------------- |
| `ERR_UID_NOT_FOUND` | The specified user does not exist |
| `ERR_CONVERSATION_NOT_FOUND` | The specified conversation does not exist |
| Error Code | Description |
| --------------------------------- | ----------------------------------------- |
| `ERR_UID_NOT_FOUND` | The specified user does not exist |
| `ERR_CONVERSATION_NOT_FOUND` | The specified conversation does not exist. This error code applies only to the deprecated [Get Conversation](/rest-api/conversations/get-conversation) and [Delete Conversation](/rest-api/conversations/delete-conversation) APIs. |
| `ERR_CONVERSATION_NOT_ACCESSIBLE` | The conversation is not accessible to the user. A user can access their own one-to-one conversations, and group conversations they are a member of. This error is also thrown when the conversation has no messages yet, as the conversation has not been created on CometChat. |

For the complete list of error codes, see [Error Guide](/articles/error-guide).

Expand Down
10 changes: 10 additions & 0 deletions sdk/javascript/error-codes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,16 @@ try {
|------|---------|
| `INVALID_CONVERSATION_TYPE` | Conversation type can be `user` or `group`. |
| `CONVERSATION_NOT_FOUND` | Conversation not found. Check the value of conversationWith and conversationType. |
| `ERR_CONVERSATION_NOT_ACCESSIBLE` | The conversation is not accessible to the requesting user. |

<Note>
`ERR_CONVERSATION_NOT_ACCESSIBLE` is the **normal, expected response when no conversation exists yet** between the two users — not just when a user tries to open a conversation with themselves. A one-to-one conversation only becomes accessible once at least one message has been exchanged (a user can access their own one-to-one conversations, and group conversations they are a member of).

To create the conversation so it can be fetched, use one of these approaches:

- **Send and delete a message** between the two users to instantiate the conversation, or
- **Use the [Add Friends API](/rest-api/friends)** with `addToConversations: true` so the conversation is created when the friendship is established.
</Note>

## Receipt Errors

Expand Down