MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / formatErrorPayload

Function formatErrorPayload

apps/kimi-code/src/tui/utils/event-payload.ts:106–112  ·  view source on GitHub ↗
(
  error: Pick<KimiErrorPayload, 'code' | 'message' | 'details'>,
)

Source from the content-addressed store, hash-verified

104}
105
106export function formatErrorPayload(
107 error: Pick<KimiErrorPayload, 'code' | 'message' | 'details'>,
108): string {
109 const filteredMessage = formatProviderFilteredMessage(error.details);
110 if (filteredMessage !== undefined) return `[${error.code}] ${filteredMessage}`;
111 return `[${error.code}] ${error.message}`;
112}
113
114function formatProviderFilteredMessage(
115 details: Record<string, unknown> | undefined,

Callers 3

handleSessionErrorMethod · 0.90
formatErrorMessageFunction · 0.85

Calls 1

Tested by

no test coverage detected