[mirotalksfu] - fix ChatGPT handle error
هذا الالتزام موجود في:
@@ -1261,8 +1261,9 @@ function startServer() {
|
|||||||
});
|
});
|
||||||
cb(response);
|
cb(response);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error instanceof OpenAI.APIError) {
|
if (error.name === 'APIError') {
|
||||||
log.error('ChatGPT', {
|
log.error('ChatGPT', {
|
||||||
|
name: error.name,
|
||||||
status: error.status,
|
status: error.status,
|
||||||
message: error.message,
|
message: error.message,
|
||||||
code: error.code,
|
code: error.code,
|
||||||
@@ -1272,7 +1273,7 @@ function startServer() {
|
|||||||
} else {
|
} else {
|
||||||
// Non-API error
|
// Non-API error
|
||||||
log.error('ChatGPT', error);
|
log.error('ChatGPT', error);
|
||||||
cb(error);
|
cb(error.message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
المرجع في مشكلة جديدة
حظر مستخدم