MCPcopy Create free account
hub / github.com/ChinaSiro/claude-code-sourcemap / debugBody

Function debugBody

restored-src/src/bridge/debugUtils.ts:46–53  ·  view source on GitHub ↗
(data: unknown)

Source from the content-addressed store, hash-verified

44
45/** Truncate a JSON-serializable value for debug logging. */
46export function debugBody(data: unknown): string {
47 const raw = typeof data === 'string' ? data : jsonStringify(data)
48 const s = redactSecrets(raw)
49 if (s.length <= DEBUG_MSG_LIMIT) {
50 return s
51 }
52 return s.slice(0, DEBUG_MSG_LIMIT) + `... (${s.length} chars)`
53}
54
55/**
56 * Extract a descriptive error message from an axios error (or any error).

Callers 3

pollForWorkFunction · 0.85

Calls 3

jsonStringifyFunction · 0.85
redactSecretsFunction · 0.70
sliceMethod · 0.45

Tested by

no test coverage detected