MCPcopy Create free account
hub / github.com/VirtualHotBar/NetMount / api

Method api

src/utils/error.ts:89–104  ·  view source on GitHub ↗

* 创建API错误

(
    message: string,
    code?: string,
    details?: Record<string, unknown>,
    cause?: Error
  )

Source from the content-addressed store, hash-verified

87 * 创建API错误
88 */
89 static api(
90 message: string,
91 code?: string,
92 details?: Record<string, unknown>,
93 cause?: Error
94 ): AppError {
95 return new AppError({
96 message,
97 type: ErrorType.API,
98 severity: ErrorSeverity.ERROR,
99 code: code ?? 'API_ERROR',
100 details,
101 recoverable: true,
102 cause,
103 })
104 }
105
106 /**
107 * 创建网络错误

Callers 4

robustFetchFunction · 0.80
fetchWithTimeoutFunction · 0.80
refreshMethod · 0.80
safeAddStorageFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected