mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 13:57:10 +00:00
fix: 使用更清晰的报错信息
This commit is contained in:
parent
b4f37b5339
commit
cae324f250
2 changed files with 1 additions and 4 deletions
|
|
@ -1052,9 +1052,6 @@ export class chatgpt extends plugin {
|
||||||
break
|
break
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
const message = error?.message || error?.data?.message || error || '出错了'
|
const message = error?.message || error?.data?.message || error || '出错了'
|
||||||
if (message !== 'Timed out waiting for first message.') {
|
|
||||||
logger.error(error)
|
|
||||||
}
|
|
||||||
retry--
|
retry--
|
||||||
errorMessage = message === 'Timed out waiting for response. Try enabling debug mode to see more information.' ? (reply ? `${reply}\n不行了,我的大脑过载了,处理不过来了!` : '必应的小脑瓜不好使了,不知道怎么回答!') : message
|
errorMessage = message === 'Timed out waiting for response. Try enabling debug mode to see more information.' ? (reply ? `${reply}\n不行了,我的大脑过载了,处理不过来了!` : '必应的小脑瓜不好使了,不知道怎么回答!') : message
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -492,7 +492,7 @@ export default class SydneyAIClient {
|
||||||
const firstTimeout = setTimeout(() => {
|
const firstTimeout = setTimeout(() => {
|
||||||
if (!replySoFar) {
|
if (!replySoFar) {
|
||||||
this.cleanupWebSocketConnection(ws)
|
this.cleanupWebSocketConnection(ws)
|
||||||
reject(new Error('Timed out waiting for first message.'))
|
reject(new Error('等待必应服务器响应超时。请尝试调整超时时间配置或减少设定量以避免此问题。'))
|
||||||
}
|
}
|
||||||
}, firstMessageTimeout)
|
}, firstMessageTimeout)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue