{"record":{"id":"23a6d3e0b31813ab","repo":"XX-net/XX-Net","slug":"app-check-except-r","errorCode":null,"errorMessage":"app check except:%r","messagePattern":"app check except:%r","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"code/default/gae_proxy/local/check_ip.py","lineNumber":75,"sourceCode":"        if response.status in [503, 500]:\n            # out of quota\n            if b\"gws\" not in server_type and b\"Google Frontend\" not in server_type and b\"GFE\" not in server_type:\n                xlog.warn(\"%d but server type:%s\", response.status, server_type)\n                return False\n            else:\n                return True\n\n        try:\n            content = response.read()\n        except Exception as e:\n            if sys.version_info[0] == 3 and (\n                    isinstance(e, ConnectionError) or\n                    isinstance(e, ConnectionResetError) or\n                    isinstance(e, BrokenPipeError)\n            ):\n                return False\n\n            self.logger.warn(\"app check except:%r\", e)\n            return False\n\n        if self.config.check_ip_content not in content:\n            self.logger.warn(\"app check content:%s\", content)\n            return False\n\n        return True\n\n\nclass CheckAllIp(object):\n\n    def __init__(self):\n        ca_certs = os.path.join(current_path, \"cacert.pem\")\n        openssl_context = SSLContext(\n            logger, ca_certs=ca_certs,\n            cipher_suites=[b'ALL', b\"!RC4-SHA\", b\"!ECDHE-RSA-RC4-SHA\", b\"!ECDHE-RSA-AES128-GCM-SHA256\",\n                           b\"!AES128-GCM-SHA256\", b\"!ECDHE-RSA-AES128-SHA\", b\"!AES128-SHA\"]\n        )","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/XX-net/XX-Net/blob/cfa5bc17b67676e467f37ec50766127e0ab5f0aa/code/default/gae_proxy/local/check_ip.py#L57-L93","documentation":"Unexpected exception during the app-check request/content processing in check_response (not one of the tolerated connection errors). The exception is logged with %r and the IP check returns False.","triggerScenarios":"check_ip raising non-connection exceptions: SSL errors, timeouts of unexpected types, decode errors, or library bugs while reading/validating the check response.","commonSituations":"SSL handshake anomalies on blocked IPs, Python/network library edge cases, or changes in the check endpoint response format.","solutions":["Inspect the %r representation in the log to identify the exception class","Update XX-Net — known checker bugs are fixed over versions","If SSL-related, verify openssl/pyopenssl compatibility","Report recurring unexpected exception types upstream"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    ok = check_ip.check_ip(ip)\nexcept Exception as e:\n    log.debug('skip ip %s: %r', ip, e)\n    continue","preventionTips":["Treat checker exceptions as per-IP skips, not crashes","Keep SSL libs updated","Log exception types to spot environment problems"],"tags":["gae-proxy","ip-check","exception"],"backgroundTag":"health-check-request-failed","analyzedSha":"cfa5bc17b67676e467f37ec50766127e0ab5f0aa","analyzedAt":"2026-08-27T19:28:28.225Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}