file-upload: Correctly handle error responses for HTTP2

Signed-off-by: Jakub Onderka <ahoj@jakubonderka.cz>
This commit is contained in:
Jakub Onderka 2021-02-10 18:14:24 +01:00
parent 847ee4041a
commit 296ffc7d34
1 changed files with 1 additions and 1 deletions

View File

@ -345,7 +345,7 @@ OC.FileUpload.prototype = {
*/
getResponse: function() {
var response = this.data.response();
if (response.errorThrown) {
if (response.errorThrown || response.textStatus === 'error') {
// attempt parsing Sabre exception is available
var xml = response.jqXHR.responseXML;
if (xml && xml.documentElement.localName === 'error' && xml.documentElement.namespaceURI === 'DAV:') {