Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Handle

Manav Rathi7e76f40f431e
diff --git a/web/apps/photos/src/components/Collections/CollectionShare.tsx b/web/apps/photos/src/components/Collections/CollectionShare.tsx
index f8106e6004..a2b64a2ceb 100644
--- a/web/apps/photos/src/components/Collections/CollectionShare.tsx
+++ b/web/apps/photos/src/components/Collections/CollectionShare.tsx
@@ -508,19 +508,24 @@ const AddParticipant: React.FC<AddParticipantProps> = ({
try {
await shareCollection(collection, email, role);
} catch (e) {
+ if (isHTTPErrorWithStatus(e, 402)) {
+ setEmailFieldError(t("sharing_disabled_for_free_accounts"));
+ return;
+ }
+
if (isHTTPErrorWithStatus(e, 404)) {
setEmailFieldError(t("sharing_user_does_not_exist"));
return;
}
- // TODO(RE):
- setEmailFieldError(handleSharingErrors(e));
- return;
+
+ throw e;
}
}
if (emails.length) {
await syncWithRemote(false, true);
}
+
onClose();
};
@@ -594,7 +599,7 @@ const AddParticipantForm: React.FC<AddParticipantFormProps> = ({
});
const resetExistingSelection = () =>
- formik.setFieldValue("selectedOptions", []);
+ formik.setFieldValue("selectedEmails", []);
return (
<form onSubmit={formik.handleSubmit}>