def _raise_for_status(self, resp: httpx.Response) -> None:
        """Take the response and raise an VespaStatusError if the status code is not 2xx.

        Args:
            resp: The response object from the httpx client

        Raises:
            VespaStatusError: If the status code is not 2xx
        """
        try:
            resp.raise_for_status()
        except httpx.HTTPStatusError as e:
            response = e.response
            try:
                json = response.json()
                error_code = json['error-code']
                message = json['message']
            except Exception:
                raise VespaStatusError(message=response.text, cause=e) from e

            self._raise_for_error_code(error_code, message, e)
Take the response and raise an VespaStatusError if the status code is not 2xx.

        Args:
            resp: The response object from the httpx client

        Raises:
            VespaStatusError: If the status code is not 2xx
        
src/marqo/vespa/vespa_client.py