ensure error responses are JSON for JS requests