e-invoicing

Error handling and status codes

TrustWeaver returns errors as SOAP faults or structured result codes depending on the service and operation invoked.

TrustWeaver uses the following mechanisms to communicate errors:
SOAP faults

Returned for protocol-level and application-level errors. Each fault contains a faultcode, a faultstring with a human-readable message, and a detail element with a service-specific fault type.

Result codes
Returned inline in the response body for operation outcomes such as signature validation results. These are not errors in the SOAP sense but indicate the outcome of a business operation.

Application-level errors

For application-level errors, it returns a fault that includes a detail element containing either a tac:TrustArchiveClientFault or a tac:TrustArchiveServerFault complex type. Both types include a Code element (the machine-readable error code) and a Description element (a human-readable explanation in English).

Important: The Description element is for human interpretation only; for example, during debugging or log review. Do not use it for programmatic error handling because it is constructed dynamically and may change over time. Use the Code element for programmatic handling.

All application-level faults also include:

  • A soap:Client or soap:Server value in the faultcode element.

  • The specific error code in the faultstring element.

The following is an example of a fault:

CODE
<soap:Envelope>
  <soap:Header />
  <soap:Body>
    <soap:Fault>
      <faultcode>soap:Client</faultcode>
      <faultstring>SectionNotEnabled</faultstring>
      <detail>
        <ClientFault xmlns="http://www.trustweaver.com/trustarchive/common/v1">
          <Code>SectionNotEnabled</Code>
          <Description>The section has not been enabled</Description>
        </ClientFault>
      </detail>
    </soap:Fault>
  </soap:Body>
</soap:Envelope>

Client faults

Client faults (tac:TrustArchiveClientFault) indicate that the error was caused by the client; for example, by sending invalid input or by requesting an operation the client is not authorized to do. Following invocations using the same parameters will fail in the same way.

When TrustWeaver detects a uniqueness constraint violation it returns an OperationUniquenessViolation client fault. The fault may include an AsyncState element that can be used to resume polling for the original operation. For the full handling pattern, see OperationUniquenessViolation in Transaction IDs and asynchronous processing.

Server faults

Server faults (tac:TrustArchiveServerFault) indicate that the error was caused by a server-side problem. Retrying the same request later may result in a successful invocation.

SOAP faults

TrustWeaver uses a SOAP fault structure. Each fault contains a FaultCode and a Reason (also known as FaultString) with a human-readable error message. The FaultCode is either Client, Client.NotAuthorized, or Server.

For Sign, Validate, and ValidateArchive operations, some outcomes are returned as inline Result elements rather than SOAP faults.

Common error codes

The following error codes can be returned by any method:
Client error codes
Code Description
Unauthorized The client is not authorized to perform the requested operation.Contact support to get more details.
ParameterMissing A mandatory part of the input parameter is missing.
ParameterInvalid A part of the input parameter is malformed.
NotSupported A part of the input parameter is not currently supported.
Server error codes
Code Description
InternalError An internal error has occurred.
TemporarilyUnavailable This operation is temporarily unavailable. Try again later.

Error reference

For service-specific error codes, see: