infiniflow/ragflow · error · RuntimeError

status: , response

Error message

status: {resp.status}, response: {text}

What it means

Error "status: {resp.status}, response: {text}" thrown in infiniflow/ragflow.

Solutions

  1. Inspect the gateway response status and body for details.
  2. Verify the gateway is running and the request payload matches its API.

Example fix

if resp.status != 200:
    text = await resp.text()
    raise Exception(f'status: {resp.status}, response: {text}')

When it happens

Trigger: Thrown at api/channels/whatsapp/channel.py:124 when the library encounters an invalid state.

Common situations: The WhatsApp gateway returns a non-success HTTP status, often from an invalid session or payload; checking the gateway logs prevents this error.


AI-assisted analysis of infiniflow/ragflow@554fb1133a (2026-08-15). Data as JSON: /api/errors/f3a09ccb89cf52d8. Report an issue: GitHub.

Appendix: source

Thrown at api/channels/whatsapp/channel.py:124

        return self._http_session

    async def _request_json(
        self,
        method: str,
        path: str,
        payload: dict[str, Any] | None = None,
    ) -> dict[str, Any]:
        session = await self._ensure_http_session()
        url = self._gateway_url(path)
        async with session.request(
            method,
            url,
            json=payload,
            headers=self._gateway_headers(),
        ) as resp:
            text = await resp.text()
            if resp.status >= 400:
                raise RuntimeError(f"status: {resp.status}, response: {text}")
            if not text.strip():
                return {}
            content_type = resp.headers.get("content-type", "")
            if "application/json" not in content_type.lower():
                raise RuntimeError(f"unexpected response content-type: {content_type or 'unknown'}, response: {text[:200]}")
            try:
                return await resp.json()
            except Exception as ex:
                raise RuntimeError(f"invalid json response: {text[:200]}") from ex

    async def _request_json_with_retry(
        self,
        method: str,
        path: str,
        payload: dict[str, Any] | None = None,
    ) -> dict[str, Any]:
        deadline = time.time() + WHATSAPP_GATEWAY_START_RETRY_SECS
        last_error: Exception | None = None

View on GitHub (pinned to 554fb1133a)