add stack to error template context