mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 21:37:11 +00:00
fix: 释放出无报错信息的情况
This commit is contained in:
parent
486b89a5b3
commit
9e69a00c10
1 changed files with 2 additions and 2 deletions
|
|
@ -1131,10 +1131,10 @@ export class chatgpt extends plugin {
|
|||
break
|
||||
} catch (error) {
|
||||
const message = error?.message || error?.data?.message || error || '出错了'
|
||||
if (message.indexOf('限流') > -1) {
|
||||
if (message && message.indexOf('限流') > -1) {
|
||||
throttledTokens.push(bingToken)
|
||||
// 不减次数
|
||||
} else if (message.indexOf('UnauthorizedRequest') > -1) {
|
||||
} else if (message && message.indexOf('UnauthorizedRequest') > -1) {
|
||||
// token过期了
|
||||
logger.warn(`token${bingToken}过期了,将自动移除`)
|
||||
let savedBingToken = await redis.get('CHATGPT:BING_TOKEN')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue