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

Method toEnvelope

cli/src/errors/base.ts:36–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34 }
35
36 toEnvelope(): ErrorEnvelope {
37 const payload: ErrorEnvelope['error'] = {
38 code: this.code,
39 message: this.message,
40 }
41 if (this.hint !== undefined)
42 payload.hint = this.hint
43 return { error: payload }
44 }
45
46 withHint<T extends BaseError>(this: T, hint: string): T {
47 const Ctor = this.constructor as new (opts: BaseErrorOptions) => T

Callers 4

toEnvelopeMethod · 0.45
base.test.tsFile · 0.45
formatErrorForCliFunction · 0.45
contract.test.tsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected