chatgpt-java icon indicating copy to clipboard operation
chatgpt-java copied to clipboard

chatGPT.chatCompletion失败时获取不到原始错误信息

Open wangpenghua opened this issue 1 year ago • 0 comments

apikey被封、限流或者余额不足时,拿不到OpenAI返回的原始错误信息 例如:

{
    "error": {
        "message": "You exceeded your current quota, please check your plan and billing details.",
        "type": "insufficient_quota",
        "param": null,
        "code": "insufficient_quota"
    }
}

因此无法根据错误信息里面的code去修改我数据库里面apikey的状态。

wangpenghua avatar Jul 17 '23 14:07 wangpenghua