windmill-labs/windmill · error · Exception

{err.request.url}: {err.response.status_code}, {err.response

Error message

{err.request.url}: {err.response.status_code}, {err.response.text}

What it means

Raised by the Python client's get() after resp.raise_for_status() fails: any non-2xx Windmill API response is re-raised with the request URL, status code, and response body inlined into a plain error. It is a thin wrapper over httpx.HTTPStatusError, so the text is exactly what the server returned — auth failures, 404s, validation errors — and no retry is attempted here.

Source

Thrown at python-client/wmill/wmill/client.py:133

        """Make an HTTP GET request to the Windmill API.

        Args:
            endpoint: API endpoint path
            raise_for_status: Whether to raise an exception on HTTP errors
            **kwargs: Additional arguments passed to httpx.get

        Returns:
            HTTP response object
        """
        endpoint = endpoint.lstrip("/")
        resp = self.client.get(f"/{endpoint}", **kwargs)
        if raise_for_status:
            try:
                resp.raise_for_status()
            except httpx.HTTPStatusError as err:
                error = f"{err.request.url}: {err.response.status_code}, {err.response.text}"
                logger.error(error)
                raise Exception(error)
        return resp

    def post(self, endpoint, raise_for_status=True, **kwargs) -> httpx.Response:
        """Make an HTTP POST request to the Windmill API.

        Args:
            endpoint: API endpoint path
            raise_for_status: Whether to raise an exception on HTTP errors
            **kwargs: Additional arguments passed to httpx.post

        Returns:
            HTTP response object
        """
        endpoint = endpoint.lstrip("/")
        resp = self.client.post(f"/{endpoint}", **kwargs)
        if raise_for_status:
            try:
                resp.raise_for_status()

View on GitHub (pinned to e474e8803c)

Solutions

  1. Inspect the inlined response text for the API's specific error detail
  2. Check the token and workspace for 401/403, the path for 404
  3. Pass raise_for_status=False and handle the response yourself when you need per-status control
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at python-client/wmill/wmill/client.py:133 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03). Data as JSON: /api/errors/51e21f0f87174863. Report an issue: GitHub.