{"record":{"id":"57bfdbd10c9d3a87","repo":"D4Vinci/Scrapling","slug":"request-failed-57bfdb","errorCode":null,"errorMessage":"Request failed","messagePattern":"Request failed","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"scrapling/engines/_browsers/_stealth.py","lineNumber":300,"sourceCode":"                    return response\n\n                except Exception as e:\n                    page_info.mark_error()\n                    if attempt < self._config.retries - 1:\n                        if is_proxy_error(e):\n                            log.warning(\n                                f\"Proxy '{proxy}' failed (attempt {attempt + 1}) | Retrying in {self._config.retry_delay}s...\"\n                            )\n                        else:\n                            log.warning(\n                                f\"Attempt {attempt + 1} failed: {e}. Retrying in {self._config.retry_delay}s...\"\n                            )\n                        time_sleep(self._config.retry_delay)\n                    else:\n                        log.error(f\"Failed after {self._config.retries} attempts: {e}\")\n                        raise\n\n        raise RuntimeError(\"Request failed\")  # pragma: no cover\n\n\nclass AsyncStealthySession(AsyncSession, StealthySessionMixin):\n    \"\"\"An async Stealthy Browser session manager with page pooling.\"\"\"\n\n    __slots__ = (\n        \"_config\",\n        \"_context_options\",\n        \"_browser_options\",\n        \"_user_data_dir\",\n        \"_headers_keys\",\n    )\n\n    def __init__(self, **kwargs: Unpack[StealthSession]):\n        \"\"\"A Browser session manager with page pooling, it's using a persistent browser Context by default with a temporary user profile directory.\n\n        :param headless: Run the browser in headless/hidden (default), or headful/visible mode.\n        :param disable_resources: Drop requests for unnecessary resources for a speed boost.","sourceCodeStart":282,"sourceCodeEnd":318,"githubUrl":"https://github.com/D4Vinci/Scrapling/blob/5d213a2d4764002bfc4fed33c32fe09fa8b0bf7f/scrapling/engines/_browsers/_stealth.py#L282-L318","documentation":"A defensive trailing raise at the end of the retry loop in StealthySession.fetch(). In normal flow the loop either returns a Response or re-raises the last exception on the final attempt (the code path even carries `# pragma: no cover`), so this line only fires if the retry loop exits without returning or raising — effectively unreachable except through control-flow anomalies.","triggerScenarios":"Only reachable if the for-attempt loop body completes every iteration without returning a Response and without raising — which the current code structure prevents (last attempt re-raises). Practically never seen in the wild.","commonSituations":"Virtually none; if you see this message it indicates an internal control-flow change/bug in scrapling itself rather than a user mistake.","solutions":["Inspect the traceback and the scrapling version; report it upstream since the real failure exception was swallowed","Update/patch scrapling to a release where the retry loop's control flow is correct"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    resp = session.fetch(url)\nexcept RuntimeError:\n    log.exception('internal retry-loop failure')\n    raise","preventionTips":["Recognize it as an internal/unreachable guard — capture full traceback and report upstream","Pin a known-good scrapling version to avoid control-flow regressions"],"tags":["internal","unreachable","retry-loop","stealth"],"backgroundTag":null,"analyzedSha":"5d213a2d4764002bfc4fed33c32fe09fa8b0bf7f","analyzedAt":"2026-08-14T22:23:09.440Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}