Merge pull request #2508 from Therosin/staging

Includes captioning error messages in toast
This commit is contained in:
Cohee
2024-07-11 10:29:09 +03:00
committed by GitHub

View File

@@ -333,8 +333,9 @@ async function getCaptionForFile(file, prompt, quiet) {
return caption; return caption;
} }
catch (error) { catch (error) {
toastr.error('Failed to caption image.'); const errorMessage = error.message || 'Unknown error';
console.log(error); toastr.error(errorMessage, "Failed to caption image.");
console.error(error);
return ''; return '';
} }
finally { finally {