The whole "error rendering" block should probably be refactored into a view helper, so that it can be used for other records.