Populate header fields when an error occurs.