Error handling and status codes
TrustWeaver returns errors as SOAP faults or structured result codes depending on the service and operation invoked.
- SOAP faults
-
These faults are 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
- These faults are returned inline in the response body for operation outcomes such as signature validation results. These are not errors in the SOAP sense, but they indicate the outcome of a business operation.
Application-level errors
For application-level errors, TrustWeaver 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, and you can use it, for example, while debugging or reviewing a log. Don't use this element for programmatic error handling because it's constructed dynamically and might change over time. For programmatic handling, use the Code element.
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 client caused the error. The client can do that, for example, by sending invalid input or by requesting an operation the client isn't 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 might include an AsyncState element that you can use to resume polling for the original operation. For the full handling pattern, see OperationUniquenessViolation.
Server faults
Server faults (tac:TrustArchiveServerFault) indicate that a server-side problem caused the error. 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 Unauthorized The client is not authorized to perform the requested operation. For more information, contact Sovos Support. ParameterMissing A required 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:
