From 9bf3c0602d4fd3fe5ac7411db697b51f87a79056 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Fri, 26 Jan 2024 13:37:46 +0000 Subject: [PATCH] HTTP Requests should return data even if there was an error The body data is often used for API error messages in the event of failure --- core/modules/utils/dom/http.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/utils/dom/http.js b/core/modules/utils/dom/http.js index 27c3e65d6..05879e5a9 100644 --- a/core/modules/utils/dom/http.js +++ b/core/modules/utils/dom/http.js @@ -289,7 +289,7 @@ exports.httpRequest = function(options) { return; } // Something went wrong - options.callback($tw.language.getString("Error/XMLHttpRequest") + ": " + this.status,null,this); + options.callback($tw.language.getString("Error/XMLHttpRequest") + ": " + this.status,this[returnProp],this); } }; // Handle progress