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

Function formatTimeout

packages/plugins/openapi/src/sdk/invoke.ts:179–180  ·  view source on GitHub ↗
(timeoutMs: number)

Source from the content-addressed store, hash-verified

177}
178
179const formatTimeout = (timeoutMs: number): string =>
180 timeoutMs % 1_000 === 0 ? `${timeoutMs / 1_000}s` : `${timeoutMs}ms`;
181
182const responseHeadersTimeoutMessage = (timeoutMs: number): string =>
183 `Upstream returned no response headers within ${formatTimeout(timeoutMs)}. The endpoint may be a live stream with no data to send (for example, runtime logs of an idle deployment); the request was aborted. Retry when the resource has activity, or use a non-streaming endpoint.`;

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected