Skip to content

API - Error Reporting

Error Reporting

The response to an API request, where that request is unsuccessful, will result in the return of an errors collection.

The errors collection is an auto serialised error structure which has the following hierarchy:

  • Errors (This is an array of Error Responses)
    • Error Response (This is an error message with zero to many elements containing details of the error)
      • Errors (An array of strings depicting the error)

From release 1.96 the structure also includes an ErrorDetails list which comprises a numerical error code and a friendly error message. Note that the codes are specific to the original calling method (i.e. CreateExportGbDeclaration and CreateJob could both return error code of 1 but these would have potentially different context sensitive meanings).

An example of the structured soap message containing an error would be something like the following:

                  <Message>Combination of Declaration UCR and part number must be unique.</Message>
            <ErrorMessage>save failed.</ErrorMessage>
               <string>Combination of Declaration UCR and part number must be unique.</string>