function()

in www/browser/FileTransfer.js [259:276]


        function (code, status, response) {
            if (transfers[that._id]) {
                delete transfers[that._id];
            }
            // In XHR GET reqests we're setting response type to Blob
            // but in case of error we need to raise event with plain text response
            if (response instanceof Blob) {
                const reader = new FileReader();
                reader.readAsText(response);
                reader.onloadend = function (e) {
                    const error = new FileTransferError(code, source, target, status, e.target.result);
                    errorCallback(error);
                };
            } else {
                const error = new FileTransferError(code, source, target, status, response);
                errorCallback(error);
            }
        };