MCPcopy Create free account
hub / github.com/EvoMap/evolver / makeOpenAIGatewayError

Function makeOpenAIGatewayError

src/proxy/index.js:64–71  ·  view source on GitHub ↗
(err, fallbackStatus = 502)

Source from the content-addressed store, hash-verified

62}
63
64function makeOpenAIGatewayError(err, fallbackStatus = 502) {
65 const name = err && err.name ? String(err.name) : '';
66 const isTimeout = name === 'TimeoutError' || name === 'AbortError';
67 const out = new Error(isTimeout ? 'openai upstream timed out' : 'openai upstream request failed');
68 out.statusCode = isTimeout ? 504 : fallbackStatus;
69 out.cause = err;
70 return out;
71}
72
73function makeGeminiGatewayError(err, fallbackStatus = 502) {
74 const name = err && err.name ? String(err.name) : '';

Callers 2

_proxyOpenAIResponsesMethod · 0.85
readTextMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected