mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Check for error
as well when parsing streaming responses
This commit is contained in:
@@ -1146,7 +1146,7 @@ function tryParseStreamingError(response, decoded) {
|
|||||||
// No JSON. Do nothing.
|
// No JSON. Do nothing.
|
||||||
}
|
}
|
||||||
|
|
||||||
const message = data?.error?.message || data?.message || data?.detail;
|
const message = data?.error?.message || data?.error || data?.message || data?.detail;
|
||||||
|
|
||||||
if (message) {
|
if (message) {
|
||||||
toastr.error(message, 'Text Completion API');
|
toastr.error(message, 'Text Completion API');
|
||||||
|
Reference in New Issue
Block a user