/ SDKs / iOS
SDKs
Chat SDKs iOS v4
Chat SDKs iOS
Chat SDKs
iOS
Version 4

Error codes

Copy link

Sendbird Chat SDK for iOS has two types of error codes.

  • Client error codes: These errors are caused by the client app side, such as entering an incorrect or invalid parameter, or sending a request when disconnected from the Sendbird server.

  • Server error codes: These errors are caused by the Sendbird server side.


Client error codes

Copy link

The following are errors labeled with six-digit integers beginning with 800 under the ChatError object.

ErrorCodeDescription

invalidInitialization

800100

Failed to initialize the SendbirdChat instance because the assigned value to the appId parameter of the initializing method isn't valid.

connectionRequired

800101

The request from a client app failed because the device isn't connected to the Sendbird server.

connectionCanceled

800102

The connection is canceled or the disconnecting method is called while the SendbirdChat instance is trying to connect to the Sendbird server via the connecting method.

invalidParameter

800110

An invalid value is specified for the parameter of the method.

networkError

800120

Failed to connect to the Sendbird server due to unstable network or an unexpected error in the Chat SDK network library.

networkRoutingError

800121

The request routing to the Sendbird server has failed.

malformedData

800130

The data format of the server response is invalid.

malformedErrorData

800140

The data format of the error message is invalid due to the problem with the request.

wrongChannelType

800150

The channel type specified in the request is invalid.

markAsReadRateLimitExceeded

800160

The interval between the successive mark-messages-as-read requests is less than a second.

queryInProgress

800170

A retrieval request has arrived while the Sendbird server is still processing the previous retrieval request for channels, messages, or users, and is preparing to send the response.

ackTimeout

800180

A timed-out error signaling that the Sendbird server has failed to send a response for the request within ten seconds.

loginTimeout

800190

A timed-out error signaling that the Sendbird server has failed to send a response for the SendbirdChat instance's login request within ten seconds.

webSocketConnectionClosed

800200

The request has failed because it was submitted while the client app was disconnected from the Sendbird server.

webSocketConnectionFailed

800210

Failed to establish websocket connection to the Sendbird server.

requestFailed

800220

The Sendbird server has failed to process the request due to an internal reason.

fileUploadCancelFailed

800230

The request to cancel a file upload has failed due to an unexpected error.

fileUploadCanceled

800240

The file upload request is canceled.

fileUploadTimeout

800250

A time-out error signaling that the Sendbird server has failed to complete the file upload request in the time period allowed.

timerWasExpired

800310

An action wasn’t completed within a certain time frame.

timerWasAlreadyDone

800302

Actions were completed multiple times when the action should have been completed just once.

pendingError

800400

Message status doesn't match.

passedInvalidAccessToken

800500

The client app failed to refresh a session with the given token because the token is invalid.

sessionKeyRefreshSucceeded

800501

The session has expired and was refreshed with the given token.

sessionKeyRefreshFailed

800502

The session has expired but the client app failed to refresh the session with the given token.

collectionDisposed

800600

The client app attempted to use a message collection or a channel collection after it has already been disposed of.

localDatabaseError

800700

The client app attempted to use local database with local caching.


Server error codes

Copy link

The following errors are six-digit integers beginning with 400, 500, and 900.

CodeDescription

400100
(bad request)

UnexpectedParameterType
The request specifies one or more parameters in an unexpected data type. The data type of the parameters should be string.

400101
(bad request)

UnexpectedParameterType
The request specifies one or more parameters in an unexpected data type. The data type of the parameters should be number.

400102
(bad request)

UnexpectedParameterType
The request specifies one or more parameters in an unexpected data type. The data type of the parameters should be list.

400103
(bad request)

UnexpectedParameterType
The request specifies one or more parameters in an unexpected data type. The data type of the parameters should be JSON.

400104
(bad request)

UnexpectedParameterType
The request specifies one or more parameters in an unexpected data type. The data type of the parameters should be boolean.

400105
(bad request)

MissingRequiredParameters
The request is missing one or more required parameters.

400106
(bad request)

NegativeNumberNotAllowed
The parameter specifies an invalid negative number. Its value should be a positive number.

400108
(bad request)

UnauthorizedRequest
The request isn't authorized and can't access the requested resource.

400110
(bad request)

ParameterValueLengthExceeded
The length of the parameter value is too long.

400111
(bad request)

InvalidValue
The request specifies an invalid value.

400112
(bad request)

IncompatibleValues
The two parameters of the request, which should have unique values, specify the same value.

400113
(bad request)

ParameterValueOutOfRange
The request specifies one or more parameters which are outside the allowed value range.

400114
(bad request)

InvalidURLOfResource
The resource identified with the URL in the request can't be found.

400151
(bad request)

NotAllowedCharacter
The request specifies an illegal value containing special character, empty string, or white space.

400201
(bad request)

ResourceNotFound
The resource identified with the request's resourceId parameter can't be found.

400202
(bad request)

ResourceAlreadyExists
The resource identified with the request's resourceId parameter already exists.

400203
(bad request)

TooManyItemsInParameter
The parameter specifies more items than allowed.

400300
(bad request)

DeactivatedUserNotAccessible
The request can't retrieve the deactivated user data.

400301
(bad request)

UserNotFound
The user identified with the request's userId parameter can't be found because either the user doesn't exist or has been deleted.

400302
(bad request)

InvalidAccessToken
The access token provided for the request specifies an invalid value.

400303
(bad request)

InvalidSessionKeyValue
The session key provided for the request specifies an invalid value.

400304
(bad request)

ApplicationNotFound
The application identified with the request can't be found.

400305
(bad request)

UserIdLengthExceeded
The length of the userId parameter value is too long.

400306
(bad request)

PaidQuotaExceeded
The request can't be completed because you have exceeded your paid quota.

400307
(bad request)

DomainNotAllowed
The request can't be completed because it came from the restricted domain.

400401
(bad request)

InvalidApiToken
The API token provided for the request specifies an invalid value.

400402
(bad request)

MissingSomeParameters
The request is missing one or more necessary parameters.

400403
(bad request)

InvalidJsonRequestBody
The request body is an invalid JSON.

400404
(bad request)

InvalidRequestURL
The request specifies an invalid HTTP request URL that can't be accessed.

400500
(bad request)

TooManyUserWebsocketConnections
The number of the user's websocket connections exceeds the allowed amount.

400501
(bad request)

TooManyApplicationWebsocketConnections
The number of the application's websocket connections exceeds the allowed amount.

400700
(bad request)

BlockedUser.SendMessageNotAllowed
The request can't be completed due to one of the following reasons: The sender is blocked by the recipient or has been deactivated, the message is longer than the maximum message length, or the message contains texts or URLs blocked by application settings or filters.

400701
(bad request)

BlockedUser.InvitedNotAllowed
The request can't be completed because the blocking user is trying to invite the blocked user to a channel.

400702
(bad request)

BlockedUser.InviteNotAllowed
The request can't be completed because the blocked user is trying to invite the blocking user to a channel.

400750
(bad request)

BannedUser.EnterChannelNotAllowed
The request can't be completed because the user is trying to enter a banned channel.

400751
(bad request)

BannedUser.EnterCustomChannelNotAllowed
The request can't be completed because the user is trying to enter a banned custom type channel.

400920
(bad request)

Unacceptable
The request failed because the combination of parameter values is invalid. Even if each parameter value is valid, a combination of parameter values becomes invalid when it doesn't follow specific conditions.
ReadOnlyMode
When the application is in read-only mode, can't complete API requests except for GET.
NotAccessible
The request DELETE fails when the corresponding message has a child message.

400930
(bad request)

InvalidEndpoint
The request failed because it is sent to an invalid endpoint that no longer exists.

403100
(forbidden)

ApplicationNotAvailable
The application identified with the request isn't available.

500601
(internal server error)

InternalError.PushTokenNotRegistered
The server encounters an error while trying to register the user's push token. Please retry the request.

500602
(internal server error)

InternalError.PushTokenNotUnregistered
The server encounters an error while trying to unregister the user's push token. Please retry the request.

500901
(internal server error)

InternalError
The server encounters an unexpected exception while trying to process the request. Please retry the request.

500910
(too many request)

RateLimitExceeded
The request can't be completed because you have exceeded your rate limits.

503
(service unavailable)

ServiceUnavailable
The request failed due to a temporary failure of the server. Please retry the request.

900010
(request failed)

UserLoginRequired
The request failed because the user isn't logged in to the server.

900020
(request failed)

UserNotMember
The request failed because the user isn't a member of the channel.

900021
(request failed)

UserDeactivated
The request failed because the user is deactivated in the service.

900022
(request failed)

UserNotOwnerOfMessage
The request failed because the user has no permission to edit the other user's message.

900023
(request failed)

PendingUserSendMessageNotAllowed
The request failed because the user is trying to send the messages in the channel of which they are not the member.

900025
(request failed)

InvalidMentionForMessage
The specified mention type in the request is invalid.

900026
(request failed)

InvalidPushOptionForMessage
The specified push option in the request is invalid.

900027
(request failed)

TooManyMetaKeyForMessage
The request failed because it specifies more meta data keys for the message than allowed.

900028
(request failed)

TooManyMetaValueForMessage
The request failed because it specifies more meta data values for the message than allowed.

900029
(request failed)

InvalidMetaArrayForMessage
The request failed because it specifies an invalid value in the meta data for the message.

900030
(request failed)

GuestNotAllowed
The request failed because the guest isn't allowed to perform this operation.

900040
(request failed)

MutedUserInApplicationSendMessageNotAllowed
The request failed because the user is muted in the application and isn't allowed to send the message.

900041
(request failed)

MutedUserInChannelSendMessageNotAllowed
The request failed because the user is muted in the channel and isn't allowed to send the message.

900050
(request failed)

ChannelFrozen
The request failed because the channel is frozen and no one can send the message to the channel.

900060
(request failed)

ProfanityMessageBlocked
The request failed because it specifies the message containing a profanity word.

900061
(request failed)

BannedURLsBlocked
The request failed because message it specifies the message containing a URL that isn't allowed.

900065
(request failed)

RestrictedDomainBlocked
The request failed because it comes from the domain that isn't allowed.

900066
(request failed)

ModeratedFileBlocked
The request failed because it contains the file violating at least one of the content management policies.

900070
(request failed)

EnterDeletedChannel
The request failed because the user is trying to enter a deleted channel.

900080
(request failed)

BlockedUserReceiveMessageNotAllowed
The request failed because the blocking user is trying to send the message to the blocked user in a 1-to-1 distinct channel.

900081
(request failed)

DeactivatedUserReceiveMessageNotAllowed
The request failed because the user is trying to send the message to the deactivated user in a 1-to-1 distinct channel.

900090
(request failed)

WrongChannelType
The request failed because it specifies a wrong channel type.

900100
(request failed)

BannedUserSendMessageNotAllowed
The request failed because the user is banned from the channel and isn't allowed to send the message.

900200
(request failed)

TooManyMessages
The number of the sent messages exceeds the allowed amount.

900300
(request failed)

MessageNotFound
The request failed because the message to edit can't be retrieved.

900400
(request failed)

TooManyParticipants
The number of the channel's participants exceeds the allowed amount.

900500
(request failed)

ChannelNotFound
The request failed because there is no channel to perform this operation.