iflytek/astron-agent · error · Exception

File download failed: HTTP

Error message

File download failed: HTTP {response.status}

What it means

_download_url_file raises when fetching a document from an HTTP(S) URL returns a non-200 status. The knowledge ingestion pipeline cannot obtain the file bytes, so processing for that URL must stop; the HTTP status is embedded for diagnosis.

Solutions

  1. Verify the URL is publicly reachable (no 401/403/404)
  2. Check for expired signed URLs or blocked egress
  3. Retry with backoff for transient 5xx responses
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at core/knowledge/infra/ragflow/ragflow_utils.py:194 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of iflytek/astron-agent@5e758547a8 (2026-09-12). Data as JSON: /api/errors/25bfef47ce7ca473. Report an issue: GitHub.

Appendix: source

Thrown at core/knowledge/infra/ragflow/ragflow_utils.py:194

            )

    @staticmethod
    async def _download_url_file(file: str) -> tuple[bytes, str]:
        """
        Download file from URL

        Args:
            file: File URL

        Returns:
            (file content, filename)
        """
        logger.info(f"Downloading file from URL: {file}")

        async with aiohttp.ClientSession() as session:
            async with session.get(file) as response:
                if response.status != 200:
                    raise Exception(f"File download failed: HTTP {response.status}")

                file_content = await response.read()
                logger.info(f"Download completed: {len(file_content)} bytes")

                # Get filename
                filename = RagflowUtils._extract_filename_from_url(file, response)

                # Validate downloaded content
                if len(file_content) == 0:
                    raise Exception("Downloaded file is empty")

                return file_content, filename

    @staticmethod
    def _extract_filename_from_url(file: str, response: Any) -> str:
        """
        Extract filename from URL or response

View on GitHub (pinned to 5e758547a8)