def _is_timeout_error(cls, error: Error, resp: httpx.Response) -> bool:
        """
        Check if the query error is a timeout error.
        """

        if error.code == 8 and error.message == "Search request soft doomed during query setup and initialization.":
            logger.warning('Detected soft doomed query')
            return True
        if error.code == 12 and resp.status_code == 504:
            return True

        return False

        Check if the query error is a timeout error.
        
src/marqo/vespa/vespa_client.py