mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-23 19:57:20 +00:00
fix: 请求/v1/messages/count_tokens 的CanceledError 不再被记录为ERROR 日志
This commit is contained in:
@@ -317,7 +317,12 @@ class ClaudeConsoleRelayService {
|
||||
}
|
||||
} catch (error) {
|
||||
// 处理特定错误
|
||||
if (error.name === 'AbortError' || error.code === 'ECONNABORTED') {
|
||||
if (
|
||||
error.name === 'AbortError' ||
|
||||
error.name === 'CanceledError' ||
|
||||
error.code === 'ECONNABORTED' ||
|
||||
error.code === 'ERR_CANCELED'
|
||||
) {
|
||||
logger.info('Request aborted due to client disconnect')
|
||||
throw new Error('Client disconnected')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user