{"record":{"id":"2a524cce44d9b6e5","repo":"XX-net/XX-Net","slug":"s-s-s-status-d-trace-s-2a524c","errorCode":null,"errorMessage":"%s %s%s status:%d trace:%s","messagePattern":"(.+?) (.+?)(.+?) status:(.+?) trace:(.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"code/default/x_tunnel/local/seley_front/front.py","lineNumber":85,"sourceCode":"\n    def request(self, method, host, path=\"/\", headers={}, data=\"\", timeout=120):\n        headers = dict(headers)\n        headers[\"XX-Account\"] = self.account\n        headers[\"X-Host\"] = host\n        headers[\"X-Path\"] = path\n\n        response = self.http_dispatcher.request(method, host, \"/\", dict(headers), data, timeout=timeout)\n        if not response:\n            logger.warn(\"req %s get response timeout\", path)\n            return \"\", 602, {}\n\n        status = response.status\n        content = response.task.read_all()\n        if status == 200:\n            logger.debug(\"%s %s%s send:%d recv:%d trace:%s\", method, host, path, len(data), len(content),\n                       response.task.get_trace())\n        else:\n            logger.warn(\"%s %s%s status:%d trace:%s\", method, host, path, status,\n                       response.task.get_trace())\n        return content, status, response\n\n    def stop(self):\n        logger.info(\"terminate\")\n        self.connect_manager.set_ssl_created_cb(None)\n        self.http_dispatcher.stop()\n        self.connect_manager.stop()\n\n        self.running = False\n\n    def set_proxy(self, args):\n        logger.info(\"set_proxy:%s\", args)\n\n        self.config.PROXY_ENABLE = args[\"enable\"]\n        self.config.PROXY_TYPE = args[\"type\"]\n        self.config.PROXY_HOST = args[\"host\"]\n        self.config.PROXY_PORT = args[\"port\"]","sourceCodeStart":67,"sourceCodeEnd":103,"githubUrl":"https://github.com/XX-net/XX-Net/blob/cfa5bc17b67676e467f37ec50766127e0ab5f0aa/code/default/x_tunnel/local/seley_front/front.py#L67-L103","documentation":"Logged by seley_front's request() when the relay returned a response whose HTTP status is not 200. It prints method, host, path, the status code, and the task trace so the failure is attributable, then returns (content, status, response) to the caller for handling.","triggerScenarios":"Any SeleyFront.request/.get call where response.status != 200 — e.g. the relay returns 403 (auth/quota), 404 (bad path/host), 5xx (upstream failure), or a block page from an intermediary.","commonSituations":"Expired or missing account credentials on the relay, requesting hosts not covered by the plan, upstream origin server errors, or ISP/middlebox injection returning error pages.","solutions":["Read the status code in the log: 403 → fix account/credentials; 404 → verify X-Host/X-Path headers; 5xx → upstream/relay problem, retry later.","Retry transient 5xx responses with backoff using the returned status.","Check the task trace to see at which hop the non-200 was produced.","Verify XX-Account header matches a valid account if the relay enforces auth."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"content, status, resp = front.request(method, host, path, timeout=timeout)\nif status != 200:\n    if 500 <= status < 600:\n        content, status, resp = retry_with_backoff(...)  # retryable\n    else:\n        handle_client_error(status, resp)  # 4xx: fix headers/account","preventionTips":["Branch on status: retry 5xx, fix 4xx.","Ensure XX-Account/X-Host/X-Path headers are always set correctly.","Log response bodies for 4xx to catch auth/quota issues early."],"tags":["seley","http","non-200","status-code","relay"],"backgroundTag":"http-error-status","analyzedSha":"cfa5bc17b67676e467f37ec50766127e0ab5f0aa","analyzedAt":"2026-08-27T19:28:28.225Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}