{"record":{"id":"6c86d17d6521b376","repo":"deepset-ai/haystack","slug":"there-was-an-issue-with-server-url-see-the-stac","errorCode":null,"errorMessage":"There was an issue with {server_url}, see the stacktrace for details.","messagePattern":"There was an issue with (.+?), see the stacktrace for details\\.","errorType":"exception","errorClass":"PipelineDrawingError","httpStatus":null,"severity":"error","filePath":"haystack/core/pipeline/draw.py","lineNumber":332,"sourceCode":"    try:\n        resp = httpx.get(url, timeout=timeout)\n        if resp.status_code >= 400:\n            logger.warning(\n                \"Failed to draw the pipeline: {server_url} returned status {status_code}\",\n                server_url=server_url,\n                status_code=resp.status_code,\n            )\n            logger.info(\"Exact URL requested: {url}\", url=url)\n            logger.warning(\"No pipeline diagram will be saved.\")\n            resp.raise_for_status()\n\n    except Exception as exc:\n        logger.warning(\n            \"Failed to draw the pipeline: could not connect to {server_url} ({error})\", server_url=server_url, error=exc\n        )\n        logger.info(\"Exact URL requested: {url}\", url=url)\n        logger.warning(\"No pipeline diagram will be saved.\")\n        raise PipelineDrawingError(f\"There was an issue with {server_url}, see the stacktrace for details.\") from exc\n\n    # Validate the response before it gets written to disk by the caller, so that a misconfigured\n    # or malicious server cannot cause arbitrary content to be saved to the output path.\n    _validate_image_response(resp, params)\n\n    return resp.content\n\n\ndef _to_mermaid_text(\n    graph: networkx.MultiDiGraph, init_params: str | dict, super_component_mapping: dict[str, str] | None = None\n) -> str:\n    \"\"\"\n    Converts a Networkx graph into Mermaid syntax.\n\n    The output of this function can be used in the documentation with `mermaid` codeblocks and will be\n    automatically rendered.\n\n    :param graph: The graph to convert to Mermaid syntax","sourceCodeStart":314,"sourceCodeEnd":350,"githubUrl":"https://github.com/deepset-ai/haystack/blob/e318778c9bf60a1963e3b5f451359655dd696c30/haystack/core/pipeline/draw.py#L314-L350","documentation":"Any exception during the HTTP request to the Mermaid rendering server (connection errors, timeouts, DNS failures, HTTP error statuses) is caught and re-raised as PipelineDrawingError, with the original exception chained. No diagram is produced.","triggerScenarios":"Calling Pipeline.draw() or show() when server_url is unreachable, DNS fails, the request times out, or the server returns an HTTP error (e.g., 500/502/429) that raises via resp.raise_for_status().","commonSituations":"No internet access / offline environment, corporate proxy blocking mermaid.ink, self-hosted renderer down, mermaid.ink rate-limiting or outage, wrong port in server_url.","solutions":["Check network connectivity and that server_url is reachable (curl the base URL)","Retry, possibly with a larger 'timeout' in the Mermaid params","Use or fix a self-hosted Mermaid renderer if mermaid.ink is blocked/rate-limited","Inspect the chained exception (stacktrace) for the root cause"],"exampleFix":"// before\npipeline.draw(path=\"graph.png\")  # default server blocked\n// after\npipeline.draw(path=\"graph.png\", server_url=\"http://localhost:3000\", params={\"timeout\": 30})","handlingStrategy":"retry","validationCode":"def can_reach(url: str) -> bool:\n    try:\n        return requests.get(url, timeout=5).status_code < 500\n    except requests.RequestException:\n        return False","typeGuard":null,"tryCatchPattern":"from haystack.core.errors import PipelineDrawingError\nimport time\nfor attempt in range(3):\n    try:\n        pipeline.draw(path=\"graph.png\")\n        break\n    except PipelineDrawingError as e:\n        logger.warning(\"draw attempt %d failed: %s\", attempt + 1, e)\n        time.sleep(2 ** attempt)\nelse:\n    logger.error(\"Skipping diagram: Mermaid server unavailable\")","preventionTips":["Set a generous timeout in Mermaid params for large graphs","Have a self-hosted mermaid renderer as fallback","Check e.__cause__ to distinguish DNS vs timeout vs HTTP errors"],"tags":["network","http","mermaid","pipeline-drawing"],"backgroundTag":"connection-refused","analyzedSha":"e318778c9bf60a1963e3b5f451359655dd696c30","analyzedAt":"2026-08-30T11:45:20.711Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}