MCPcopy Create free account
hub / github.com/Noumena-Network/code / logAntError

Function logAntError

src/utils/debug.ts:430–440  ·  view source on GitHub ↗
(context: string, error: unknown)

Source from the content-addressed store, hash-verified

428 * Logs errors for Ants only, always visible in production.
429 */
430export function logAntError(context: string, error: unknown): void {
431 if ((process.env.NCODE_BUILD_MODE !== 'noumena' && process.env.USER_TYPE !== 'ant')) {
432 return
433 }
434
435 if (error instanceof Error && error.stack) {
436 logForDebugging(`[ANT-ONLY] ${context} stack trace:\n${error.stack}`, {
437 level: 'error',
438 })
439 }
440}

Callers 8

queryLoopFunction · 0.85
maybeFunction · 0.85
_executeApiKeyHelperFunction · 0.85
runAwsAuthRefreshFunction · 0.85
runGcpAuthRefreshFunction · 0.85
getMcpHeadersFromHelperFunction · 0.85

Calls 1

logForDebuggingFunction · 0.70

Tested by

no test coverage detected