From 682b67f990d918ee9ea5c36ee324cb43a755efd1 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 --- 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..98495ab20b 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; },