Skip to main content

Status Codes

About 2 min

Status Codes

Status Code is introduced in the latest version. A sample solution as IoTDB requires registering the time series first before writing data is:

try {
} catch (SQLException e) {
  // the most case is that the time series does not exist
  if (e.getMessage().contains("exist")) {
      //However, using the content of the error message is not so efficient
      //write data once again

With Status Code, instead of writing codes like if (e.getErrorMessage().contains("exist")), we can simply use e.getErrorCode() == TSStatusCode.TIME_SERIES_NOT_EXIST_ERROR.getStatusCode().

Here is a list of Status Code and related message:

Status CodeStatus TypeMeanings
203INCOMPATIBLE_VERSIONIncompatible version
298NODE_DELETE_FAILED_ERRORFailed while deleting node
299ALIAS_ALREADY_EXIST_ERRORAlias already exists
300PATH_ALREADY_EXIST_ERRORPath already exists
301PATH_NOT_EXIST_ERRORPath does not exist
302UNSUPPORTED_FETCH_METADATA_OPERATION_ERRORUnsupported fetch metadata operation
303METADATA_ERRORMeet error when dealing with metadata
305OUT_OF_TTL_ERRORInsertion time is less than TTL time bound
306CONFIG_ADJUSTERIoTDB system load is too large
307MERGE_ERRORMeet error while merging
308SYSTEM_CHECK_ERRORMeet error while system checking
309SYNC_DEVICE_OWNER_CONFLICT_ERRORSync device owners conflict
310SYNC_CONNECTION_EXCEPTIONMeet error while sync connecting
311STORAGE_GROUP_PROCESSOR_ERRORStorage group processor related error
312STORAGE_GROUP_ERRORStorage group related error
313STORAGE_ENGINE_ERRORStorage engine related error
314TSFILE_PROCESSOR_ERRORTsFile processor related error
315PATH_ILLEGALIllegal path
316LOAD_FILE_ERRORMeet error while loading file
317STORAGE_GROUP_NOT_READYThe storage group is in recovery mode, not ready fore accepting read/write operation
400EXECUTE_STATEMENT_ERRORExecute statement error
401SQL_PARSE_ERRORMeet error while parsing SQL
402GENERATE_TIME_ZONE_ERRORMeet error while generating time zone
403SET_TIME_ZONE_ERRORMeet error while setting time zone
404NOT_STORAGE_GROUP_ERROROperating object is not a storage group
405QUERY_NOT_ALLOWEDQuery statements are not allowed error
406AST_FORMAT_ERRORAST format related error
407LOGICAL_OPERATOR_ERRORLogical operator related error
408LOGICAL_OPTIMIZE_ERRORLogical optimize related error
409UNSUPPORTED_FILL_TYPE_ERRORUnsupported fill type related error
410PATH_ERRORPath related error
411QUERY_PROCESS_ERRORQuery process related error
412WRITE_PROCESS_ERRORWriting data related error
413WRITE_PROCESS_REJECTWriting data rejected error
414QUERY_ID_NOT_EXISTKill query with non existent queryId
500INTERNAL_SERVER_ERRORInternal server error
501CLOSE_OPERATION_ERRORMeet error in close operation
502READ_ONLY_SYSTEM_ERROROperating system is read only
503DISK_SPACE_INSUFFICIENT_ERRORDisk space is insufficient
504START_UP_ERRORMeet error while starting up
505SHUT_DOWN_ERRORMeet error while shutdown
506MULTIPLE_ERRORMeet error when executing multiple statements
600WRONG_LOGIN_PASSWORD_ERRORUsername or password is wrong
601NOT_LOGIN_ERRORHas not logged in
602NO_PERMISSION_ERRORNo permissions for this operation, please add privilege
603UNINITIALIZED_AUTH_ERRORUninitialized authorizer
700PARTITION_NOT_READYPartition table not ready
701TIME_OUTOperation timeout
702NO_LEADERNo leader
703UNSUPPORTED_OPERATIONUnsupported operation
704NODE_READ_ONLYNode read only
705CONSISTENCY_FAILUREConsistency check failure
706NO_CONNECTIONCan not get connection error
707NEED_REDIRECTIONNeed direction
800CONFIG_ERRORConfiguration error

All exceptions are refactored in latest version by extracting uniform message into exception classes. Different error codes are added to all exceptions. When an exception is caught and a higher-level exception is thrown, the error code will keep and pass so that users will know the detailed error reason.
A base exception class "ProcessException" is also added to be extended by all exceptions.

Copyright © 2024 The Apache Software Foundation.
Apache and the Apache feather logo are trademarks of The Apache Software Foundation

Have a question? Connect with us on QQ, WeChat, or Slack. Join the community now.

We use Google Analytics to collect anonymous, aggregated usage information.