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 committed by Daniel Kesselberg
parent edad2526fb
commit 287c935c72
No known key found for this signature in database
GPG key ID: 36E3664E099D0614

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:') {