Skip to content
Orvanov0.2.0

template_invalid

HTTP status: 422 · Code: template_invalid

An email template failed to parse, names an unknown variable or filter, or is too costly to render.

An email template failed to parse, uses a variable or filter that doesn’t exist, or would take too much work to render.

Read the error message for the line, fix the template in the console’s email templates, and use the preview to check it. See Email settings and templates.

Every SDK throws one error type for a failed call. Match on its code, which is always template_invalid for this error, never on the message.

import { ErrorCode, OrvanoError } from '@orvano/js'
try {
// your Orvano call
} catch (error) {
if (error instanceof OrvanoError && error.code === ErrorCode.templateInvalid) {
// handle template_invalid
} else {
throw error
}
}

The error also carries the HTTP status (422), a message, and a request ID. Quote the request ID when you report a problem: the server logs it with the failure. See Errors for how errors work in every SDK, or every error code.