[#986] Create an errors component to be used in .tt files

Fixes #986.