AI Integration Quick Reference
AI Integration Quick Reference
CometChatException object with four properties:
- TypeScript
- JavaScript
Initialization Errors
Login & Authentication Errors
Calling Errors
Message Errors
Media Upload Errors
Raised by the Upload Files flow — delivered through theMediaUploadListener (onFileError / onFileFailure) — and by sendMediaMessage(). Rejected errors (onFileError) mean the input must change and are not retryable; failed errors (onFileFailure) are transient and can be retried with retryFileUpload().
User Errors
Group Errors
Conversation Errors
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 with
addToConversations: trueso the conversation is created when the friendship is established.
Receipt Errors
AI Feature Errors
Extension Errors
Feature Restriction Errors
Network & API Errors
Validation Errors
These errors use dynamic codes based on the parameter name (e.g.,INVALID_UID, UID_IS_COMPULSORY):
Prosody (WebSocket Server) Errors
General Errors
Server-Side API Errors
For REST API error codes (returned by the CometChat backend), see the Error Guide. Common server-side errors you may encounter in SDK responses:
See the full list in the Error Guide.
Next Steps
Troubleshooting
Common issues and solutions
Rate Limits
Understand and handle rate limits
Error Guide (REST API)
Complete server-side error code reference
Best Practices
Recommended patterns for error handling