Skip to content

Commit 17e2416

Browse files
authored
fix(web-ui): include error when failing to enable notification (#934)
1 parent 525298f commit 17e2416

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

services/web-ui/src/features/settings/pages/SettingsPage/SettingsPage.container.tsx

+5-2
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,18 @@ export function SettingsPageContainer(): ReactElement {
1919

2020
const deleteAccountMutation = useMutation({
2121
onError: (error) => {
22-
logger.error("Failed to enable notifications", { error });
22+
logger.error("Failed to delete account", { error });
2323
snackbar.error(t("danger-zone.delete-account.error"));
2424
},
2525
onSuccess: () => snackbar.success(t("danger-zone.delete-account.success")),
2626
mutationFn: () => profileApi.deleteCurrentProfile(),
2727
});
2828

2929
const enableNotificationsMutation = useMutation({
30-
onError: () => snackbar.error(t("notifications.enable.error")),
30+
onError: (error) => {
31+
logger.error("Failed to enable notifications", { error });
32+
snackbar.error(t("notifications.enable.error"));
33+
},
3134
onSuccess: () => snackbar.success(t("notifications.enable.success")),
3235
mutationFn: async () => {
3336
await Notification.requestPermission();

0 commit comments

Comments
 (0)