response.error now responds with proper content-type header