diff --git a/src/api/promocode.ts b/src/api/promocode.ts index c9091edc..0f409653 100644 --- a/src/api/promocode.ts +++ b/src/api/promocode.ts @@ -19,7 +19,7 @@ export async function activatePromocode(promocode: string) { return response.greetings; } catch (nativeError) { const [error] = parseAxiosError(nativeError); - throw new Error(error); + } } diff --git a/src/pages/Tariffs/Tariffs.tsx b/src/pages/Tariffs/Tariffs.tsx index 2fc36e8b..e9fd7c91 100644 --- a/src/pages/Tariffs/Tariffs.tsx +++ b/src/pages/Tariffs/Tariffs.tsx @@ -200,7 +200,7 @@ function TariffPage() { setDiscounts(discounts); } }) - .catch(enqueueSnackbar); + .catch((error) => {if (error.message !== "" && typeof(error.message)==="string") enqueueSnackbar(error.message)}) } return (