Error Codes
Sendbird Chat SDK for Flutter 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 parameters, 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 error_code.dart
are six-digit integers beginning with 800.
Error | Code | Description |
---|---|---|
unknownError | 800000 | The client app encounters an unexpected exception while trying to sending a request. |
invalidInitialization | 800100 | The initialization of the |
connectionRequired | 800101 | The request from a client app failed because the device isn't connected to the server. |
connectionCanceled | 800102 | The connection is canceled or the disconnecting method is called while the |
invalidParameter | 800110 | The parameter of the method specifies an invalid value. |
networkError | 800120 | The connection failed due to the unstable network or an unexpected error in the Chat SDK network library. |
networkRoutingError | 800121 | The request routing to the server 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 specified channel type 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 is arriving while the server is still processing the previous retrieval request for channels, messages, or users, and in preparation to send the response. |
ackTimeout | 800180 | The server failed to send a response for the request in 10 seconds (timed-out). |
loginTimeout | 800190 | The server failed to send a response for the |
webSocketConnectionClosed | 800200 | The request failed due to being submitted while disconnected from the server. |
webSocketConnectionFailed | 800210 | The websocket connection to the server failed to establish. |
requestFailed | 800220 | The server failed to process the request due to an internal reason. |
fileUploadCancelFailed | 800230 | The request to cancel file upload failed due to an unexpected error. |
fileUploadCanceled | 800240 | The file upload request is canceled. |
fileUploadTimeout | 800250 | The file upload request failed because it's timed-out. |
fileSizeLimitExceeded | 800260 | The file upload request failed because the file size was too big. |
timerWasExpired | 800301 | A timer-related fuction failed because the time ran out. |
timerWasAlreadyDone | 800302 | A timer-related fuction failed because the time ran out. |
pendingError | 800400 | |
passedInvalidAccessToken | 800500 | The access token provided for the request specifies an invalid value. |
sessionKeyRefreshSucceeded | 800501 | The session key was successfully refreshed. |
sessionKeyRefreshFailed | 800502 | The session key wasn't refreshed. |
Server error codes
The following errors are six-digit integers beginning with 400, 500, and 900.
Code | Description |
---|---|
400100 | invalidParameteraValueString |
400101 | nvalidParameterValueNumber |
400102 | invalidParameterValueList |
400103 | invalidParameterValueJson |
400104 | invalidParameterValueBoolean |
400105 | invalidParameterValueRequired |
400106 | invalidParameterValuePositive |
400107 | invalidParameterValueNegative |
400108 | nonAuthorized |
400109 | tokenExpired |
400110 | invalidChannelUrl |
400111 | invalidParameterValue |
400151 | unusableCharacterIncluded |
400201 | notFoundInDatabase |
400202 | duplicatedData |
400300 | userDeactivated |
400301 | userNotExist |
400302 | accessTokenNotValid |
400303 | authUnknownError |
400304 | appIdNotValid |
400305 | authUserIdTooLong |
400306 | authPlanQuotaExceeded |
400309 | sessionKeyExpired |
400310 | sessionTokenRevoked |
400401 | invalidApiToken |
400402 | parameterMissing |
400403 | invalidJsonBody |
500901 | internalServerError |
500910 | rateLimitExceeded |