From dc347d1aed5bf49245e9ae2be2ccd87377df5fbf Mon Sep 17 00:00:00 2001 From: Vincent JAILLOT Date: Tue, 3 Dec 2024 11:57:06 +0100 Subject: [PATCH] fix(fetcher): improve image loading error log MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Raphaƫl Duhen <45125768+HoloTheDrunk@users.noreply.github.com> --- src/Provider/Fetcher.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Provider/Fetcher.js b/src/Provider/Fetcher.js index f8c2adcf61..88dd189949 100644 --- a/src/Provider/Fetcher.js +++ b/src/Provider/Fetcher.js @@ -104,7 +104,11 @@ export default { rej = reject; }); - textureLoader.load(url, res, () => {}, rej); + textureLoader.load(url, res, () => {}, (event) => { + const error = new Error(`Failed to load texture from URL: \`${url}\``); + error.originalEvent = event; + rej(error); + }); return promise; },