Class ErrorToTemplateConverter

Serializes an Error by filling in the provided template. Content-type is based on the constructor parameter.

In case the input Error has an errorCode value, the converter will look in the descriptions for a file with the exact same name as that error code + extension. The templating engine will then be applied to that file. That result will be passed as an additional parameter to the main templating call, using the variable codeMessage.

Hierarchy

Constructors

Properties

codeTemplatesPath: string
contentType: string
extension: string
inputTypes: Promise<ValuePreferences>
mainTemplatePath: string
outputTypes: Promise<ValuePreferences>
templateEngine: TemplateEngine<Dict<any>>

Methods