MCPcopy Create free account
hub / github.com/xerrors/Yuxi / getErrorMessage

Method getErrorMessage

web/src/utils/errorHandler.js:53–58  ·  view source on GitHub ↗

* 获取错误消息 * @param {Error} error - 错误对象 * @param {string} context - 错误上下文 * @returns {string} 错误消息

(error, context)

Source from the content-addressed store, hash-verified

51 * @returns {string} 错误消息
52 */
53 static getErrorMessage(error, context) {
54 if (error?.message) {
55 return `${context}失败: ${error.message}`
56 }
57 return `${context}失败`
58 }
59
60 /**
61 * 处理网络请求错误

Callers 1

handleErrorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected