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

Function safeHubErrorCode

src/proxy/lifecycle/manager.js:424–437  ·  view source on GitHub ↗
(data, statusCode)

Source from the content-addressed store, hash-verified

422}
423
424function safeHubErrorCode(data, statusCode) {
425 const candidates = [
426 data?.error,
427 data?.reason,
428 data?.payload?.error,
429 data?.payload?.reason,
430 ];
431 for (const value of candidates) {
432 if (typeof value !== 'string') continue;
433 const code = value.trim();
434 if (/^[a-z][a-z0-9_:-]{0,79}$/i.test(code)) return code;
435 }
436 return `http_${statusCode}`;
437}
438
439function normalizeNodeSecretEnvSuppression(value) {
440 const raw = String(value || '').trim();

Callers 1

helloMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected