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

Function getErrorCode

packages/kaos/src/ssh.ts:154–160  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

152}
153
154function getErrorCode(error: unknown): number | undefined {
155 if (typeof error !== 'object' || error === null) {
156 return undefined;
157 }
158 const { code } = error as { code?: unknown };
159 return typeof code === 'number' ? code : undefined;
160}
161
162function getErrorMessage(error: unknown): string {
163 if (error instanceof Error) {

Callers 1

mapSftpErrorFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected