Skip to main content
typedef NS_ENUM(NSUInteger, JErrorCode) {
JErrorCodeNone = 0,
//AppKey is missing
JErrorCodeAppKeyEmpty = 11001,
//Token is missing
JErrorCodeTokenEmpty = 11002,
//AppKey does not exist
JErrorCodeAppKeyInvalid = 11003,
//Token is invalid
JErrorCodeTokenIllegal = 11004,
//Token is unauthorized
JErrorCodeTokenUnauthorized = 11005,
//Token has expired
JErrorCodeTokenExpired = 11006,
//application is banned
JErrorCodeAppProhibited = 11009,
//user is banned
JErrorCodeUserProhibited = 11010,
//user was forced offline
JErrorCodeUserKickedByOtherClient = 11011,
//user logged out
JErrorCodeUserLogOut = 11012,

//users are not friends
JErrorCodeNotFriend = 12009,
//operation is not permitted
JErrorCodeNoOperationPermission = 12010,
//message does not exist
JErrorCodeRemoteMessageNotExist = 12011,
//message is already in favorites
JErrorCodeAddDuplicateFavoriteMessage = 12012,
//end-to-end encrypted chat hash does not match
JErrorCodePubKeysHashMismatch = 12013,

//group does not exist
JErrorCodeGroupNotExist = 13001,
//user is not a group member
JErrorCodeNotGroupMember = 13002,

//default chatroom error
JErrorCodeChatroomUnknownError = 14000,
//user is not a chatroom member
JErrorCodeNotChatroomMember = 14001,
//chatroom attributes are full (maximum 100)
JErrorCodeChatroomAttributeCountExceed = 14002,
//not authorized to modify the chatroom attribute (the key was not set by the current user)
JErrorCodeChatroomKeyUnauthorized = 14003,
//chatroom attribute does not exist
JErrorCodeChatroomAttributeNotExist = 14004,
//chatroom does not exist
JErrorCodeChatroomNotExist = 14005,
//chatroom has been destroyed
JErrorCodeChatroomDestroyed = 14006,

//connection is prohibited
JErrorCodeConnectForbidden = 21000,
//invalid parameter
JErrorCodeInvalidParam = 21003,
//operation timed out
JErrorCodeOperationTimeOut = 21004,
//connection is unavailable
JErrorCodeConnectionUnavailable = 21005,
//server configuration error
JErrorCodeServerSetError = 21006,
//connection already exists
JErrorCodeConnectionAlreadyExist = 21007,
//Moments request failed
JErrorCodeMomentRequestError = 21008,
//friend does not exist
JErrorCodeFriendNotExist = 21009,

//message does not exist
JErrorCodeMessageNotExist = 22001,
//message has been recalled
JErrorCodeMessageAlreadyRecalled = 22002,
//message upload failed
JErrorCodeMessageUploadError = 22003,
//a key or value in the recalled message's extras is not an NSString
JErrorCodeRecallExtrasTypeNotString = 22004,
//remote public key was not found
JErrorCodeOtherSideE2EEInvalid = 22006,
//local public key has not been generated
JErrorCodeLocalPublicKeyInvalid = 22007,

//download target is not a media message
JErrorCodeDownloadNotMediaMessage = 23001,
//message download failed
JErrorCodeMessageDownloadError = 23006,
//message download already exists
JErrorCodeDownloadAlreadyExist = 23008,
//message download was canceled
JErrorCodeDownloadCanceled = 23009,

//failed to set chatroom attributes in a batch
JErrorCodeChatroomBatchSetAttributeFail = 24001,

//failed to join the LiveKit room
JErrorCodeJoinLiveKitFail = 25001
};