Error response image. Image Serving normally returns an error status with a text message when an error occurs.

attribute::ErrorImage allows configuring an image, catalog entry, or template to be returned in case of error.


Missing images can also be handled with attribute::DefaultImage.

An Image Serving template can be configured which might render the error message text into the response image. The following predefined variables can be included in the $error.title template, which is substituted with a short error description, and $error.message, which is substituted by a more detailed error description (the level of detail is configured with attribute::ErrorDetail).

HTTP status 200 is returned if the error image/template can be processed successfully. If an error occurs during this processing, the HTTP error status and a text message are returned.


Text string. If specified, must be a valid catalog::Id value in an image catalog or a relative (to attribute::RootPath) or absolute path to an image file accessible by the Image Server.


Inherited from default::ErrorImage if not defined. If defined but empty, error image behavior is disabled, even if default::ErrorImage is defined, and an HTTP error status and text message is returned.


To get response images with the error message rendered into the image, we must first define the template in the image catalog. In this case, we create an entry in our image catalog called onError, containing the following in catalog::Modifier:


The template is registered with attribute::ErrorImage:


For this example, the text is rendered using the default font, font color, and font size.

See also

attribute::RootPath , catalog::Id, attribute::DefaultImage, attribute::ErrorDetail

On this page