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

Function isAbortError

apps/kimi-code/src/tui/utils/errors.ts:5–14  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

3}
4
5export function isAbortError(error: unknown): boolean {
6 if (error instanceof Error) {
7 return error.name === 'AbortError' || isAbortMessage(error.message);
8 }
9 if (typeof error === 'object' && error !== null) {
10 const message = (error as { readonly message?: unknown }).message;
11 return typeof message === 'string' && isAbortMessage(message);
12 }
13 return isAbortMessage(String(error));
14}

Callers 1

handleInitCommandFunction · 0.90

Calls 1

isAbortMessageFunction · 0.85

Tested by

no test coverage detected