Error handling and status codes
TrustWeaver returns errors as SOAP faults or structured result codes depending on the service and operation invoked.
- SOAP faults
-
Returned for protocol-level and application-level errors. Each fault contains a
faultcode, afaultstringwith a human-readable message, and adetailelement 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).
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:Clientorsoap:Servervalue in thefaultcodeelement. -
The specific error code in the
faultstringelement.
The following is an example of a fault:
<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
- Client error codes
-
Code Description UnauthorizedThe client is not authorized to perform the requested operation.Contact support to get more details. ParameterMissingA mandatory part of the input parameter is missing. ParameterInvalidA part of the input parameter is malformed. NotSupportedA part of the input parameter is not currently supported. - Server error codes
-
Code Description InternalErrorAn internal error has occurred. TemporarilyUnavailableThis operation is temporarily unavailable. Try again later.
Error reference
For service-specific error codes, see:
