Error Code

Error response is a json object containing error code and error message for example:

{ error_code:error_message }

Common errors

Code Message
100 Please check your Internet connection
101 Connection error
102 User has not logged-in
103 JSON Parsing error
104 Initial settings error
105 User has already logged-out or chatLogin and getUserID functions are not configured correctly on the server
106 The file does not exist at given path
107 CometChat is not installed at specified url
108 Please configure Translate Conversation module on CometChat admin panel

Login error

Code Message
200 Incorrect userID (server returns 0 for login with userID)
201 Invalid User (Server has returned empty response)
202 Invalid URL or response for login is incorrect or chatlogin() is not configured correctly on the server
203 Sorry, CometChat needs to be upgraded on the site to use this SDK. An old version of CometChat detected, version must be 5.4+ or incorrect response from server including warnings
204 Incorrect username and password (server returns 0 for login with username and password)

One-on-One Error

Code Message
300 An error occurred while blocking user. Server returns 0; either user is already blocked or some other server error
301 An error occurred while unblocking user. Server returns 0 ; either user is not blocked or some other server error

Chatroom error

Code Message
400 User has not joined any group
401 Cannot create chatoom. Chatroom with the same name exists.
402 Please enter correct password for group.
403 You are banned from this group
404 User has been banned from given group
405 This group does not exist
406 You do not have the privileges(owner, moderator or admin) to delete this group OR group doesn’t exists.

AVChat error

Code Message
500 Audio/Video Chat plugin not enabled from Admin Panel
501 No Call Details found. Possible reasons: calling startConference() function before join/sendRequest function or calling startAVChatCall() function before sending/accepting call request or trying to reject/cancel the call when there is no call
502 User provided for Audio/Video Chat call is incorrect
503 Local media unavailable
504 Audio/Video Chat call could not connect
505 This device does not support Audio/Video Chat feature
506 User is already busy in a call
507 Container view provided for Audio/Video Chat is nil
  • Was this helpful?
  • Yes   No