Merge pull request #641 from BlipRanger/dev

This commit is contained in:
Cohee
2023-07-06 08:26:08 +03:00
committed by GitHub

View File

@@ -318,7 +318,12 @@ async function onExportClick() {
link.click();
document.body.removeChild(link);
} 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}`);
}
}