The following fields are associated with the error responses that use this error template:

  • code
  • message

To create the error template, perform the following steps:

  1. Create a file named error-template.vtl with the following contents:
    #set ($code = "UNEXPECTED_ERROR")
    #if($status == 403)
      #set ($code = "ACCESS_FAILED")
  2. Add the error template to the configuration.
    dsconfig create-error-template \
      --template-name "Custom Error Template" \
      --set "velocity-template<error-template.vtl"
  3. Assign the error template to the Sideband API Endpoint.
    dsconfig set-sideband-api-endpoint-prop \
      --endpoint-name "Test API" \
      --set "error-template:Custom Error Template"

The error template is used whenever the Sideband API generates an error in response to a request.