Skip to content

Commit e06be1f

Browse files
committed
fix(demo): check health() return value before printing Connected
client.health() returns bool, not raises — bare call ignored the result. Now raise RuntimeError with a clear message if health check fails.
1 parent d5d2f7f commit e06be1f

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

demo/notebooks/03_langgraph_agent.ipynb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,18 @@
7575
" from coordinode import CoordinodeClient\n",
7676
"\n",
7777
" client = CoordinodeClient(COORDINODE_ADDR)\n",
78-
" client.health()\n",
78+
" if not client.health():\n",
79+
" client.close()\n",
80+
" raise RuntimeError(f\"CoordiNode at {COORDINODE_ADDR} is not serving health checks\")\n",
7981
" print(f\"Connected to {COORDINODE_ADDR}\")\n",
8082
"elif _port_open(GRPC_PORT):\n",
8183
" COORDINODE_ADDR = f\"localhost:{GRPC_PORT}\"\n",
8284
" from coordinode import CoordinodeClient\n",
8385
"\n",
8486
" client = CoordinodeClient(COORDINODE_ADDR)\n",
85-
" client.health()\n",
87+
" if not client.health():\n",
88+
" client.close()\n",
89+
" raise RuntimeError(f\"CoordiNode at {COORDINODE_ADDR} is not serving health checks\")\n",
8690
" print(f\"Connected to {COORDINODE_ADDR}\")\n",
8791
"else:\n",
8892
" # No server available — use the embedded in-process engine.\n",

0 commit comments

Comments
 (0)