Attach response headers to error object