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

Function formatErrorForCli

cli/src/errors/format.ts:30–35  ·  view source on GitHub ↗
(err: PrintableError, opts: FormatErrorOptions = {})

Source from the content-addressed store, hash-verified

28}
29
30export function formatErrorForCli(err: PrintableError, opts: FormatErrorOptions = {}): string {
31 const env = err.toEnvelope()
32 if (opts.format === 'json')
33 return renderEnvelope(env)
34 return renderHuman(env, opts.isErrTTY ?? false)
35}
36
37function renderEnvelope(env: ErrorEnvelope): string {
38 const raw = env.error.raw_response

Callers 3

runFunction · 0.90
failFunction · 0.90
format.test.tsFile · 0.90

Calls 3

renderEnvelopeFunction · 0.85
renderHumanFunction · 0.85
toEnvelopeMethod · 0.45

Tested by

no test coverage detected