Swift file upload fails on zed with "This name already exists." for non-existing files.
Please see attached screenshot for the behavior.
I've narrowed this down to a change in 'function getObjectDetails' in swift.service.js.
The 'Migrate to AngularJS v1.8.2' change in commit f044c4b0a3 updated the file with:
@@ -297,9 +297,9 @@
);
if (ignoreError) {
// provide a noop error handler so the error is ignored
- return promise.error(angular.noop);
+ return promise.catch(angular.noop);
}
- return promise.error(function () {
+ return promise.catch(function onError() { toastService.add('error', gettext('Unable to get details of the object.'));
});
}
If I revert these 2 lines of code, I'm able to upload a file again without the error.
Swift file upload fails on zed with "This name already exists." for non-existing files.
Please see attached screenshot for the behavior.
I've narrowed this down to a change in 'function getObjectDetails' in swift.service.js.
The 'Migrate to AngularJS v1.8.2' change in commit f044c4b0a3 updated the file with:
@@ -297,9 +297,9 @@ error(angular. noop); catch(angular. noop); error(function () { catch(function onError() {
toastService. add('error' , gettext('Unable to get details of the object.'));
);
if (ignoreError) {
// provide a noop error handler so the error is ignored
- return promise.
+ return promise.
}
- return promise.
+ return promise.
});
}
If I revert these 2 lines of code, I'm able to upload a file again without the error.