Changes: use Fail message as toast title, only show actual message with fallback.
This commit is contained in:
parent
fee36419ac
commit
51f09c1382
|
@ -333,8 +333,9 @@ async function getCaptionForFile(file, prompt, quiet) {
|
|||
return caption;
|
||||
}
|
||||
catch (error) {
|
||||
toastr.error(`Failed to caption image. ${error}`);
|
||||
console.log(error);
|
||||
const errorMessage = error.message || 'Unknown error';
|
||||
toastr.error(errorMessage, "Failed to caption image.");
|
||||
console.error(error);
|
||||
return '';
|
||||
}
|
||||
finally {
|
||||
|
|
Loading…
Reference in New Issue