{"record":{"id":"9e9caa6181e19f9b","repo":"XX-net/XX-Net","slug":"605","errorCode":"605","errorMessage":"status:%d","messagePattern":"status:(.+?)","errorType":"exception","errorClass":"GAE_Exception","httpStatus":null,"severity":"error","filePath":"code/default/gae_proxy/local/gae_handler.py","lineNumber":366,"sourceCode":"            raise GAE_Exception(604, \"appid out of quota:%s\" % appid)\n\n        server_type = response.getheader(b\"Server\", b\"\")\n        if (b\"gws\" not in server_type and b\"Google Frontend\" not in server_type and b\"GFE\" not in server_type) or \\\n                response.status == 403 or response.status == 405:\n\n            # some ip can connect, and server type can be gws\n            # but can't use as GAE server\n            # so we need remove it immediately\n\n            xlog.warn(\"IP:%s not support GAE, headers:%s status:%d\", response.ssl_sock.ip_str, response.headers,\n                      response.status)\n            response.worker.close(\"ip not support GAE\")\n            raise GAE_Exception(602, \"ip not support GAE\")\n\n        response.gps = response.getheader(b\"x-server\", b\"\")\n\n        if response.status > 300:\n            raise GAE_Exception(605, \"status:%d\" % response.status)\n\n        if response.status != 200:\n            xlog.warn(\"GAE %s appid:%s status:%d\", response.ssl_sock.ip_str,\n                      appid, response.status)\n\n        return response\n    except GAE_Exception as e:\n        if e.error_code not in (600, 603, 604) and hasattr(response, \"ssl_sock\"):\n            front.ip_manager.recheck_ip(response.ssl_sock.ip_str, first_report=False)\n        raise e\n\n\ndef request_gae_proxy(method, url, headers, body, timeout=None):\n    headers = dict(headers)\n    # make retry and time out\n    time_request = time.time()\n\n    # GAE urlfetch will not decode br if Accept-Encoding include gzip","sourceCodeStart":348,"sourceCodeEnd":384,"githubUrl":"https://github.com/XX-net/XX-Net/blob/cfa5bc17b67676e467f37ec50766127e0ab5f0aa/code/default/gae_proxy/local/gae_handler.py#L348-L384","documentation":"GAE_Exception 605 raised when the frontend's HTTP status is > 300 (and not one of the previously handled 404/503/403/405 cases). This covers unexpected redirects and other 3xx/4xx/5xx statuses that make the GAE response unusable; the status number is embedded in the message.","triggerScenarios":"request_gae_proxy where the app or an intermediary returns e.g. 302 redirect, 410, or 500 — statuses the GAE protocol client cannot interpret as a valid app response.","commonSituations":"GAE app misconfigured (redirecting /_gh/), Google-serving region-specific error, app code throwing 500, partial platform incidents.","solutions":["Check the exact embedded status code to narrow the cause (302 vs 500 vs 410)","Inspect your GAE app's handler for /_gh/ — it must answer with the GAE protocol, not redirects or errors","Redeploy the app / update XX-Net if the app code is stale","Retry; transient 5xx from the platform usually clears"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    resp = request_gae_proxy(...)\nexcept GAE_Exception as e:\n    if e.code == 605:\n        status = int(str(e).split(':')[1])\n        if status >= 500:\n            resp = request_gae_proxy(...)  # transient server error\n        else:\n            raise  # redirect/config issue; don't retry blindly\n    else:\n        raise","preventionTips":["Inspect the embedded status: 3xx means app misconfiguration, 5xx usually transient","Ensure your GAE app's /_gh/ handler returns the protocol response, not redirects","Pin app and client versions together"],"tags":["gae-proxy","http-status","unexpected-response"],"backgroundTag":"unexpected-http-status","analyzedSha":"cfa5bc17b67676e467f37ec50766127e0ab5f0aa","analyzedAt":"2026-08-27T19:28:28.225Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}