MCPcopy Index your code
hub / github.com/codeaashu/claude-code / debugBody

Function debugBody

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 2

jsonStringifyFunction · 0.85
redactSecretsFunction · 0.70

Tested by

no test coverage detected