Skip to content

Commit 0c5d34a

Browse files
committed
add(notification): request failure handler
1 parent 7111535 commit 0c5d34a

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

app/src/views/AccountNotifications/EmailPreferences/SubscriptionModal/i18n.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"countriesSelectedLabel": "{numCountries} {countryLabel} selected",
2121
"countryLabelSingular": "country",
2222
"countryLabelPlural": "countries",
23-
"unlimitedOptionValue": "Unlimited"
23+
"unlimitedOptionValue": "No limit",
24+
"detailFetchFailureMessage": "Failed to fetch subscription details"
2425
}
2526
}

app/src/views/AccountNotifications/EmailPreferences/SubscriptionModal/index.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,12 @@ function SubscriptionModal(props: Props) {
122122
}),
123123
);
124124
},
125-
// TODO: handle failure
125+
onFailure: () => {
126+
alert.show(
127+
strings.updateFailureMessage,
128+
{ variant: 'danger' },
129+
);
130+
},
126131
});
127132

128133
const {

0 commit comments

Comments
 (0)