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

Function formatErrorMessage

apps/kimi-code/src/tui/utils/event-payload.ts:95–104  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

93}
94
95export function formatErrorMessage(error: unknown): string {
96 if (isKimiError(error)) {
97 return formatErrorPayload({
98 code: error.code,
99 message: error.message,
100 details: error.details,
101 });
102 }
103 return error instanceof Error ? error.message : String(error);
104}
105
106export function formatErrorPayload(
107 error: Pick<KimiErrorPayload, 'code' | 'message' | 'details'>,

Callers 15

sendMessageInternalMethod · 0.90
sendSkillActivationMethod · 0.90
activatePluginCommandMethod · 0.90
steerMessageMethod · 0.90
resumeSessionMethod · 0.90
switchToSessionMethod · 0.90
createNewSessionMethod · 0.90

Calls 2

isKimiErrorFunction · 0.85
formatErrorPayloadFunction · 0.85

Tested by

no test coverage detected