The Customize Error Response assertion lets you configure the error response for a service. You can select the following responses when an error is encountered:
For SOAP services, consider using the Customize SOAP Fault Response Assertion as well, as it contains SOAP-specific settings.
Configure the error response:
Select the response to use for an error:
|Response HTTP Status||Enter the HTTP status code to return. Alternatively, you may enter a context variable that contains the status code.|
|Response Content-Type||Enter the valid Content-Type header to return. Alternatively, you may enter a context variable that contains the Content-Type.|
|Extra Response Headers||
Optionally specify one or more custom HTTP headers to be inserted into the custom error response (for example, to transmit application-specific metadata).
Be sure you are aware of the consequences of adding headers to a message. If in doubt, please contact your system administrator.
To add a header:
To modify a header:
To remove a header:
Enter the text to be returned in the response. This text will be returned as entered; the assertion performs no validation. You may include context variables in the response body to provide additional informational information about the error. The assertion can utilize any context variable set during the execution of the policy.
Note: The Response Body does not support use of a Document Type Definition (DTD) for XML content.
Tip: The Response Body can use context variables output from the encapsulated assertion.
|[Include the policy download URL as an HTTP header]||
Select this check box to indicate that the policy download URL is included as an HTTP header in the response if it is required.
Clear this check box to not include the policy download URL in the HTTP header in a response.
Click [OK]when done.