diff --git a/shared/editor/commands/insertFiles.ts b/shared/editor/commands/insertFiles.ts index f8289d681..21814e07b 100644 --- a/shared/editor/commands/insertFiles.ts +++ b/shared/editor/commands/insertFiles.ts @@ -146,8 +146,8 @@ const insertFiles = function ( } }; - newImg.onerror = (error) => { - throw error; + newImg.onerror = (event) => { + throw new Error(`Error loading image: ${event}`); }; newImg.src = src;