Adjust aphro streaming error parser
This commit is contained in:
parent
2c7b954a8d
commit
bda15ef007
|
@ -437,9 +437,11 @@ function tryParseStreamingError(response) {
|
|||
// No JSON. Do nothing.
|
||||
}
|
||||
|
||||
if (data?.error?.message) {
|
||||
toastr.error(data.error.message, 'API Error');
|
||||
throw new Error(data.error.message);
|
||||
const message = data?.error?.message || data?.message;
|
||||
|
||||
if (message) {
|
||||
toastr.error(message, 'API Error');
|
||||
throw new Error(message);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue