Error Reporting

Errors are reported by using a platform-neutral ErrorStackType or FaultStackType element, the definition of which is provided.

These elements can be returned in the following situations:

  • If the error causes the complete operation to be halted (for example, an XML parsing error, or any kind of error in the ExecuteChanges operation) a SOAP fault is generated, and an FaultStackType element is returned.
  • Otherwise, an ErrorStackType element is returned in the response XML appropriate to where the error was detected in a RetrievalError, TraversalError, or ObjectResponseType element.

The structure of an ErrorStackType element in a RetrievalError, TraversalError, or ObjectResponseType element is as follows (the FaultStackType element has the same structure):


RetrievalError/TraversalError/ObjectResponseType
     ErrorStackType ErrorStack(RetrievalError,TraversalError) or Item(ObjectResponseType)
          ErrorNameType ErrorName
          ErrorRecordType ErrorRecord[0]
               DiagnosticType Diagnostic[0]
               DiagnosticType DiagnosticType[1]
                    .
                    .
          ErrorRecordType
 ErrorRecord[1]
               .
               .