MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / probeServer

Function probeServer

packages/app/src/server-disconnected.ts:18–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16
17/** The unauthenticated health endpoint every Executor server exposes. */
18const probeServer = async (): Promise<boolean> => {
19 // oxlint-disable-next-line executor/no-try-catch-or-throw, executor/no-raw-fetch -- boundary: fetch rejects when the server is down, which is precisely the signal being read
20 try {
21 const response = await fetch("/api/health", { cache: "no-store" });
22 return response.ok && (await response.text()).trim() === "ok";
23 } catch {
24 return false;
25 }
26};
27
28const showDisconnectedOverlay = (): void => {
29 if (document.getElementById(OVERLAY_ID)) return;

Callers

nothing calls this directly

Calls 2

textMethod · 0.65
fetchFunction · 0.50

Tested by

no test coverage detected