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}`);
       }