No custom error page for non-standard status code

Many thanks! The suggested solution does exactly what I want.
However, I don’t understand why I can’t just use custom error pages, when I return an error.

Having to use a different mechanism seems unintuitive and over-complicated.

Also, the error page embeds the content-type in the errorfile, whereas when payload files are used, the content-type needs to be specified in the config, causing unnecessary clutter.

From my point of view, a feature request would make sense.