add 4xx/5xx templates and handling