mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 22:07:10 +00:00
fix: change error msg
This commit is contained in:
parent
133eb0e87d
commit
b5e8ad1034
1 changed files with 2 additions and 4 deletions
|
|
@ -73,12 +73,10 @@ export class OfficialChatGPTClient {
|
|||
try {
|
||||
fullResponse = JSON.parse(fullResponse)
|
||||
} catch (e) {
|
||||
let detail = JSON.parse(bodyText)
|
||||
throw new Error(detail.detail || 'unkown error, please check log')
|
||||
throw new Error(bodyText || 'unkown error, please check log')
|
||||
}
|
||||
if (!fullResponse?.message) {
|
||||
let detail = JSON.parse(bodyText)
|
||||
throw new Error(detail.detail || 'unkown error, please check log')
|
||||
throw new Error(bodyText || 'unkown error, please check log')
|
||||
}
|
||||
return {
|
||||
text: fullResponse.message.content.parts[0],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue