MCPcopy
hub / github.com/ValueCell-ai/ClawX / parseTimeoutMs

Function parseTimeoutMs

electron/services/gateway-api.ts:24–30  ·  view source on GitHub ↗
(timeoutMs: unknown)

Source from the content-addressed store, hash-verified

22};
23
24function parseTimeoutMs(timeoutMs: unknown): number | undefined {
25 if (timeoutMs === undefined) return undefined;
26 if (typeof timeoutMs !== 'number' || !Number.isFinite(timeoutMs) || timeoutMs <= 0) {
27 throw new Error('Invalid gateway RPC timeout');
28 }
29 return timeoutMs;
30}
31
32export function createGatewayApi(
33 gatewayManager: GatewayManager,

Callers 1

createGatewayApiFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected