缺陷 / 高 / LLM 适配器
electron/harness/adapters/base-adapter.ts
mapError 通过 err.message.includes('401') 判断认证失败,includes('429') 判断限流。 这会误匹配:
err.message.includes('401')
includes('429')
gpt-4-29b
误判后:
if (err.response?.status === 401) { return new MetonaError('AUTH_FAILED', 'Authentication failed', false); } if (err.response?.status === 429) { return new MetonaError('RATE_LIMITED', 'Rate limited', true); }
/\b401\b/
No dependencies set.
The note is not visible to the blocked user.
问题类型
缺陷 / 高 / LLM 适配器
文件位置
electron/harness/adapters/base-adapter.ts问题描述
mapError 通过
err.message.includes('401')判断认证失败,includes('429')判断限流。这会误匹配:
gpt-4-29b误判后:
影响
建议修复
/\b401\b/使用单词边界