Data Governance Server Documentation Index
Configuration Reference Home

Error Template

Note: this component stores cluster-wide configuration data and is mirrored across all servers in the topology within the the same cluster.

Note: changes to cluster-wide configuration objects are immediately and automatically mirrored across all servers within the same cluster, so offline changes are not supported.

A template for an error response returned from the Data Governance Server when a policy is rejected or other error condition occurs.

Creating a template will have no effect on error generation -- the template will need to be attached to an API Endpoint, causing errors from that endpoint to use the template. This allows for different endpoints, potentially representing different APIs, to use different error formats.

Relations to This Component
Properties
dsconfig Usage

Relations to This Component

The following components have a direct aggregation relation to Error Templates:

Properties

The properties supported by this managed object are as follows:


Basic Properties: Advanced Properties:
↓ velocity-template  None
↓ content-type

Basic Properties

velocity-template

Description
The template with which the error response will be built. The template should expect the fields 'status' and 'message' for filling out the error data, as well as 'requestURI', 'requestQueryParams', 'headers', and 'correlationId' from the HTTP request. 'status' is a number representing the returned HTTP Status Code; 'message' is a string error message; 'requestURI' is a string containing the entire URL being requested; 'requestQueryParams' is a JSON map of arrays containing the parsed query parameters from the request; 'headers' is a JSON object containing the request headers; and 'correlationId' is a string containing the request's correlation ID.
Default Value
None
Allowed Values
application/vtl
Multi-Valued
No
Required
No
Admin Action Required
None. Modification requires no further action

content-type

Description
The content MIME type to use when returning the error response. The HTTP response representing the error will have this type in its 'Content-Type' header; it should generally match the type of document generated by the Velocity template. Common media types are 'text/html', 'application/xml', and 'application/json'.
Default Value
application/json
Allowed Values
A string
Multi-Valued
No
Required
Yes
Admin Action Required
None. Modification requires no further action


dsconfig Usage

To list the configured Error Templates:

dsconfig list-error-templates
     [--property {propertyName}] ...

To view the configuration for an existing Error Template:

dsconfig get-error-template-prop
     --template-name {name}
     [--tab-delimited]
     [--script-friendly]
     [--property {propertyName}] ...

To update the configuration for an existing Error Template:

dsconfig set-error-template-prop
     --template-name {name}
     (--set|--add|--remove) {propertyName}:{propertyValue}
     [(--set|--add|--remove) {propertyName}:{propertyValue}] ...

To create a new Error Template:

dsconfig create-error-template
     --template-name {name}
     [--set {propertyName}:{propertyValue}] ...

To delete an existing Error Template:

dsconfig delete-error-template
     --template-name {name}