feat: 添加Claude账户403错误处理和封禁状态支持

- 新增Claude账户403错误自动检测和处理机制
- 区分Claude账户401未授权和403封禁两种错误状态
- 支持非流式和流式请求中的401/403错误处理
- 优化Claude账户错误处理代码,减少重复逻辑
- 支持前端显示不同的Claude账户错误状态和颜色
- 完善Claude账户异常Webhook通知错误码区分
This commit is contained in:
iaineng
2025-09-04 00:27:27 +08:00
parent ac9107aa5f
commit 1ff14e38cb
4 changed files with 104 additions and 12 deletions

View File

@@ -68,6 +68,7 @@ class WebhookNotifier {
const errorCodes = {
'claude-oauth': {
unauthorized: 'CLAUDE_OAUTH_UNAUTHORIZED',
blocked: 'CLAUDE_OAUTH_BLOCKED',
error: 'CLAUDE_OAUTH_ERROR',
disabled: 'CLAUDE_OAUTH_MANUALLY_DISABLED'
},