* 处理聊天相关错误 * @param {Error} error - 错误对象 * @param {string} operation - 操作类型
(error, operation)
| 86 | * @param {string} operation - 操作类型 |
| 87 | */ |
| 88 | static handleChatError(error, operation) { |
| 89 | const contextMap = { |
| 90 | send: '发送消息', |
| 91 | create: '创建对话', |
| 92 | delete: '删除对话', |
| 93 | rename: '重命名对话', |
| 94 | load: '加载对话', |
| 95 | export: '导出对话', |
| 96 | stream: '流式处理' |
| 97 | } |
| 98 | |
| 99 | const context = contextMap[operation] || operation |
| 100 | return this.handleError(error, context) |
| 101 | } |
| 102 | |
| 103 | /** |
| 104 | * 处理验证错误 |
nothing calls this directly
no test coverage detected