MCPcopy Create free account
hub / github.com/langgenius/dify / renderEnvelope

Function renderEnvelope

cli/src/errors/format.ts:37–47  ·  view source on GitHub ↗
(env: ErrorEnvelope)

Source from the content-addressed store, hash-verified

35}
36
37function renderEnvelope(env: ErrorEnvelope): string {
38 const raw = env.error.raw_response
39 if (raw === undefined)
40 return JSON.stringify(env)
41 if (!isVerbose()) {
42 delete env.error.raw_response
43 return JSON.stringify(env)
44 }
45 env.error.raw_response = redactBearer(raw)
46 return JSON.stringify(env)
47}
48
49// CLI-authored hint wins: it knows local remediation (e.g. which command to
50// run); the server hint fills in when the CLI has nothing for this error.

Callers 1

formatErrorForCliFunction · 0.85

Calls 2

isVerboseFunction · 0.90
redactBearerFunction · 0.90

Tested by

no test coverage detected