mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 13:57:10 +00:00
fix: 无response body的情况
This commit is contained in:
parent
943ee5951b
commit
e343d54ea2
1 changed files with 2 additions and 2 deletions
|
|
@ -122,8 +122,8 @@ export default class SydneyAIClient {
|
||||||
}
|
}
|
||||||
if (response.status !== 200) {
|
if (response.status !== 200) {
|
||||||
logger.error('创建sydney对话失败: status code: ' + response.status + response.statusText)
|
logger.error('创建sydney对话失败: status code: ' + response.status + response.statusText)
|
||||||
logger.error(text)
|
logger.error('response body:' + text)
|
||||||
throw new Error(text)
|
throw new Error('创建sydney对话失败: status code: ' + response.status + response.statusText)
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
return JSON.parse(text)
|
return JSON.parse(text)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue