added the headers field to error responses