Android
Error Codes

Error Codes

The Android SDK has two types of error codes:

  • Client error codes: these errors are usually caused by something the client app side did, such as incorrect or invalid parameter, or sending a request when disconnected.
  • Server error codes: these errors are usually caused by a SendBird server side issue.

Client error codes

The following errors that are defined in SendBirdError.java are six-digit integers beginning with 800.

ErrorCodeDescription

ERR_INVALID_INITIALIZATION

800100

The initialization of the SendBird instance failed because the assigned value to the appId parameter of the initializing method is not valid.

ERR_CONNECTION_REQUIRED

800101

The request from a client app failed because the device is not connected to the server.

ERR_CONNECTION_CANCELED

800102

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

ERR_INVALID_PARAMETER

800110

The parameter of the method specifies an invalid value.

ERR_NETWORK

800120

The connection failed due to the unstable network or an unexpected error in the SDK network library.

ERR_NETWORK_ROUTING_ERROR

800121

The request routing to the server failed.

ERR_MALFORMED_DATA

800130

The data format of the server response is invalid.

ERR_MALFORMED_ERROR_DATA

800140

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

ERR_WRONG_CHANNEL_TYPE

800150

The specified channel type in the request is invalid.

ERR_MARK_AS_READ_RATE_LIMIT_EXCEEDED

800160

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

ERR_QUERY_IN_PROGRESS

800170

A retrieval request is arriving while the server is still processing the previous retrieval request for channels, messages, or users, and in preparation to send the response.

ERR_ACK_TIMEOUT

800180

The server failed to send a response for the request in 10 seconds (timed-out).

ERR_LOGIN_TIMEOUT

800190

The server failed to send a response for the SendBird instance's login request in 10 seconds (timed-out).

ERR_WEBSOCKET_CONNECTION_CLOSED

800200

The request failed due to being submitted while disconnected from the server.

ERR_WEBSOCKET_CONNECTION_FAILED

800210

The websocket connection to the server failed to establish.

ERR_REQUEST_FAILED

800220

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

ERR_FILE_UPLOAD_CANCEL_FAILED

800230

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

ERR_FILE_UPLOAD_CANCELED

800240

The file upload request is canceled.

ERR_REACTION_DUPLICATED

800250

The request to react to the message failed because the user has already made an identical reaction attempt to the corresponding messsage.


Server error codes

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

CodeDescription

400100
(bad request)

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

400101
(bad request)

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

400102
(bad request)

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

400103
(bad request)

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

400104
(bad request)

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

400105
(bad request)

MISSING_REQUIRED_PARAMETER
The request is missing one or more required parameters.

400106
(bad request)

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

400107
(bad request)

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

400108
(bad request)

UNAUTHORIZED_REQUEST
The request is not authorized and cannot access the requested resource.

400109
(bad request)

EXPIRED_PAGE_TOKEN
The value of the token parameter for pagination has expired.

400110
(bad request)

PARAMETER_VALUE_LENGTH_EXCEEDED
The length of the parameter value is too long.

400111
(bad request)

INVALID_VALUE
The request specifies an invalid value.

400112
(bad request)

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

400151
(bad request)

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

400201
(bad request)

RESOURCE_NOT_FOUND
The resource identified with the request's resourceId parameter cannot be found.

400202
(bad request)

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

400203
(bad request)

TOO_MANY_ITEMS_IN_PARAMETER
The parameter specifies more items than allowed.

400300
(bad request)

DEACTIVATED_USER_NOT_ACCESSIBLE
The request cannot retrieve the deactivated user data.

400301
(bad request)

USER_NOT_FOUND
The user identified with the request's userId parameter cannot be found.

400302
(bad request)

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

400303
(bad request)

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

400304
(bad request)

APPLICATION_NOT_FOUND
The application identified with the request's appId parameter cannot be found.

400305
(bad request)

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

400306
(bad request)

PAID_QUOTA_EXCEEDED
The request cannot be completed because you have exceeded your paid quota.

400307
(bad request)

DOMAIN_NOT_ALLOWED
The request cannot be completed because it came from the restricted domain.

400401
(bad request)

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

400402
(bad request)

MISSING_SOME_PARAMETER
The request is missing one or more necessary parameters.

400403
(bad request)

INVALID_JSON_REQUEST_BODY
The request body is an invalid JSON.

400404
(bad request)

INVALID_REQUEST_URL
The request specifies an invalid URL that cannot be accessed.

400500
(bad request)

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

400501
(bad request)

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

400700
(bad request)

BLOCKED_USER.SEND_MESSAGE_NOT_ALLOWED
The request cannot be completed because the blocked user is trying to send a message to the blocking user.

400701
(bad request)

BLOCKED_USER.INVITED_NOT_ALLOWED
The request cannot be completed because the blocking user is trying to invite the blocked user to a channel.

400702
(bad request)

BLOCKED_USER.INVITE_NOT_ALLOWED
The request cannot be completed because the blocked user is trying to invite the blocking user to a channel.

400750
(bad request)

BANNED_USER.ENTER_CHANNEL_NOT_ALLOWED
The request cannot be completed because the user is trying to enter a banned channel.

400751
(bad request)

BANNED_USER.ENTER_CUSTOM_CHANNEL_NOT_ALLOWED
The request cannot be completed because the user is trying to enter a banned custom type channel.

400800
(bad request)

FREE_QUOTA_EXCEEDED
The request cannot be completed because you have exceeded your free quota.

500601
(internal server error)

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

500602
(internal server error)

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

500901
(internal server error)

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

500910
(too many request)

RATE_LIMIT_EXCEEDED
The request cannot be completed because you have exceeded your rate limits.

500920
(internal server error)

UNAUTHORIZED_OPERATION
The request is not authorized because you are not allowed to perform this operation.

503
(service unavailable)

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

900010
(request failed)

USER_LOGIN_REQUIRED
The request failed because the user is not logged in to the server.

900020
(request failed)

USER_NOT_MEMBER
The request failed because the user is not a member of the channel.

900021
(request failed)

USER_DEACTIVATED
The request failed becuase the user is deactivated in the service.

900022
(request failed)

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

900023
(request failed)

PENDING_USER_SEND_MESSAGE_NOT_ALLOWED
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)

INVALID_MENTION_FOR_MESSAGE
The specified mention type in the request is invaild.

900026
(request failed)

INVALID_PUSH_OPTION_FOR_MESSAGE
The specified push option in the request is invalid.

900027
(request failed)

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

900028
(request failed)

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

900029
(request failed)

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

900030
(request failed)

GUEST_NOT_ALLOWED
The request failed because the guest is not allowed to perform this operation.

900040
(request failed)

MUTED_USER_IN_APPLICATION_SEND_MESSAGE_NOT_ALLOWED
The request failed because the user is muted in the application and is not allowed to send the message.

900041
(request failed)

MUTED_USER_IN_CHANNEL_SEND_MESSAGE_NOT_ALLOWED
The request failed because the user is muted in the channel and is not allowed to send the message.

900050
(request failed)

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

900060
(request failed)

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

900061
(request failed)

BANNED_URLS_BLOCKED
The request failed because message it specifies the message containing a URL that is not allowed.

900065
(request failed)

RESTRICTED_DOMAIN_BLOCKED
The request failed because it comes from the domain that is not allowed.

900066
(request failed)

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

900070
(request failed)

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

900080
(request failed)

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

900081
(request failed)

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

900090
(request failed)

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

900100
(request failed)

BANNED_USER_SEND_MESSAGE_NOT_ALLOWED
The request failed because the user is banned from the channel and is not allowed to send the message.

900200
(request failed)

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

900300
(request failed)

MESSAGE_NOT_FOUND
The request failed because the message to edit cannot be retrieved.

900400
(request failed)

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

900500
(request failed)

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