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
This commit is contained in:
Jeremy Ruston 2024-01-26 13:37:46 +00:00
parent a9f9ffd409
commit 9bf3c0602d
1 changed files with 1 additions and 1 deletions

View File

@ -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