mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Merge pull request #641 from BlipRanger/dev
This commit is contained in:
@@ -318,7 +318,12 @@ async function onExportClick() {
|
|||||||
link.click();
|
link.click();
|
||||||
document.body.removeChild(link);
|
document.body.removeChild(link);
|
||||||
} else {
|
} else {
|
||||||
toastr.error('An error occurred while attempting to download the data');
|
//Show the error from the result without the html, only what's in the body paragraph
|
||||||
|
let parser = new DOMParser();
|
||||||
|
let error = await exportResult.text();
|
||||||
|
let doc = parser.parseFromString(error, 'text/html');
|
||||||
|
let errorMessage = doc.querySelector('p').textContent;
|
||||||
|
toastr.error(`An error occurred while attempting to download the data from ChromaDB: ${errorMessage}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user