def __is_json_error(self, status, headers):
    content_header = headers.get('content-type', '')
    content_type, unused_params = cgi.parse_header(content_header)
    return (status.startswith('400') and
            content_type.lower() in _ALL_JSON_CONTENT_TYPES)
Determine if response is an error.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/endpoints/apiserving.py/_ApiServer.__is_json_error