Handle Import Service API errors and exceptions

The Import Service API throws two type of errors:

  • Job level errors - are severe enough to cause the entire import job to fail. These errors can be found in the GetDetailsAsync endpoints for IImportJobController and IImportSourceController.
  • Item level errors - are specific to rows within the data source being imported. Unlike job level errors, item level errors do not cause the entire import job to fail. Instead, they are logged and the import process continues with the next row from the load file. Item level errors can result in whole record, meaning document or RDO, not being imported to the workspace or the record in the workspace can be incomplete. You can retrieve all item level errors that occurred during the import process from GetItemErrorsAsync endpoint for IImportSourceController.

Retrieving errors

Error handling in Import Service returns error codes and error messages:

  • in every response for failed HTTP request
  • when requested by user for all job level errors that occurred during importing of particular data source

Error code structure

Error codes returned from the Import Service API endpoint has the following structure, [Resource].[Action].[ErrorType].[ErrorNumber]. For example, J.CR.VLD.1501 is returned when a job cannot be created because validation has failed.

Resources

The possible resource codes for an error code are listed in the following table:

Resource code Description
J Job
C Document Configuration
S Source
E ItemErrors
R RDO Configuration

Actions

The possible action codes for an error code are listed in the following table:

Action code Description
BEG Begin
CR Create
CNL Cancel
END End
GET Get
GET_COL Get columns
GET_CFG Get config
GET_DAT Get data
GET_DTLS Get details
GET_PRG Get progress
LN Line
PS Pause
RD Read
RES Resume
RUN Run

Error types

The possible error types for an error code are listed in the following table:

Error type code Description
INT Internal service error
EXT External dependency error
VLD Validation error

Error numbers

Error numbers have four digits. Digits on the first and on the second position have specific meanings.

The first digits meaning is the same for all error types.

Resource code Description
0XXX General error
1XXX Job related error
2XXX Configuration related error
3XXX Source related error
4XXX ItemErrors related error

The second digits meaning differs for each error type.

Error Type Resource code Description
INT X[0-9]XX Service errors
EXT X[0-9]XX Runtime errors
VLD X0XX Invalid input data
VLD X5XX System state does not allow to execute request
VLD X6XX Data in the system does not exist
VLD X7XX Data in the system is incorrect
VLD X9XX Data in the system is corrupted