From a86be1b702b61fdde401809da573c842e576ab5b Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Mon, 2 Jun 2025 17:18:27 +0100 Subject: [PATCH] Show backend error messages in downloader --- src/main/resources/static/js/downloader.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/resources/static/js/downloader.js b/src/main/resources/static/js/downloader.js index 7bdcd83d5..77ed439dc 100644 --- a/src/main/resources/static/js/downloader.js +++ b/src/main/resources/static/js/downloader.js @@ -267,6 +267,15 @@ console.error('Throwing error banner, response was not okay'); return handleJsonResponse(response); } + let text = ''; + try { + text = await response.text(); + } catch (e) { + console.error('Failed reading error text', e); + } + if (text && text.trim().length > 0) { + throw new Error(text); + } throw new Error(`HTTP error! status: ${response.status}`); }