We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d55f506 + 3288b2b commit 671ff2dCopy full SHA for 671ff2d
swift_browser_ui_frontend/src/common/swift_x_account_sharing_bind.js
@@ -160,7 +160,12 @@ class SwiftXAccountSharing {
160
let shared = fetch(
161
url, { method: "POST" },
162
).then(
163
- (resp) => { return resp.json(); },
+ (resp) => {
164
+ if (resp.status == 409) {
165
+ throw new Error("Container already shared.");
166
+ }
167
+ return resp.json();
168
+ },
169
);
170
return shared;
171
}
swift_browser_ui_frontend/src/components/ShareModal.vue
@@ -322,7 +322,7 @@ export default {
322
323
324
catch(error) {
325
- if (error instanceof TypeError) {
+ if (error.message.match("Container already shared.")) {
326
document.querySelector("#shareModal-toasts").addToast(
327
{
328
id: "error-duplicate",
0 commit comments