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

Function makeGeminiGatewayError

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

Source from the content-addressed store, hash-verified

71}
72
73function makeGeminiGatewayError(err, fallbackStatus = 502) {
74 const name = err && err.name ? String(err.name) : '';
75 const isTimeout = name === 'TimeoutError' || name === 'AbortError';
76 const out = new Error(isTimeout ? 'gemini upstream timed out' : 'gemini upstream request failed');
77 out.statusCode = isTimeout ? 504 : fallbackStatus;
78 out.cause = err;
79 return out;
80}
81
82function makeOllamaGatewayError(err, fallbackStatus = 502) {
83 const name = err && err.name ? String(err.name) : '';

Callers 2

_proxyGeminiMethod · 0.85
readTextMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected