templates now accept error messages