From 198c20db76971fc35b887ce807876a39c622be52 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Tue, 28 Mar 2023 08:38:34 -0400 Subject: [PATCH] Return error when GET returns a non-plain text file --- src/js/assets.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/js/assets.js b/src/js/assets.js index 2872fe5ac..5e2a7dd5d 100644 --- a/src/js/assets.js +++ b/src/js/assets.js @@ -202,6 +202,7 @@ assets.fetchText = async function(url) { const text = details.content.trim(); if ( text.startsWith('<') && text.endsWith('>') ) { details.content = ''; + details.error = 'assets.fetchText(): Not a text file'; } // Important: Non empty text resource must always end with a newline