FAQ: Modifying the 404 No Virtual Directory Found Error

 

When Sentry returns a "Server Error 404" message, this indicates that the request hit an enabled HTTP Listener Policy (listening IP and port) but that there was no match to a Sentry virtual directory (WSDL or Content Policy).

The 404 error that is returned is the "Default Format" of the error template associated to the HTTP listener policy.

The default values for this "Default Format" is:

<html><head><title>Server Error %errorcode%</title></head>
<body><h1>Server Error %errorcode%</h1>
<big><b>%abortmsg%</b></big>
<p>
<b>System Name:</b> %sysname% <br>
<b>Server Policy:</b> %policy%<br>
<b>Matched task list:</b> %tasklist% <br>
<b>Failure occurred in task:</b> %task%<br>
</body>
</html>


Note that there are 3 different formats in an error template because different failures for different types of services require different formats. For instance, a failure in a WSDL policy requires a SOAP fault.  You can modify the templates to provide whatever information you want sent back to the client. However, be aware that the error template may be used by multiple policies, so modifying it could impact several services.

For more information on Error Templates, see the attached Network Policies Guide or hit the ? on the top right of the Error templates page.

The values with the % characters are variables. A full list is included below. 

Error Template Variables in Sentry:

%attr.<attribute name>% The value of the session attribute. In the example %attr.sessionnum%, the attribute name is sessionnum. The attribute name can be a defined attribute on a Map Attribute to XML task, a Map Attribute from XML task or it can be a user attribute.
%date% The date (year, month and day) displayed when the Task generated the error.
%datetime% The date (year, month and day) and time (hour, minute and second) displayed when the Task generated the error.
%errorcode% The error code returned by the server or a system error matched to an HTTP error code.
%errormsg% The detailed error message displayed when the error is triggered.
%policy% The policy name that generated the error.
%sysname% The name of the system. This name is added in the Network screen or through the network config name command from the CLI. Note: If a System Name (found on the Network screen) has not been added, then the default template will display the %sysname% tag as blank.
%task% The name of the Task that generated the error.
%tasklist% The name of the Task List that generated the error.
%time% The time (hour, minute and second) displayed when the Task generated the error.
%transaction% The document ID of the request.
%username% The user name for the user that generated the error.

0 Comments

Article is closed for comments.