Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Use subscription-appropriate error fallback in pulse actions (#79113)

Fraserd9064c454ad4
diff --git a/frontend/src/metabase/notifications/pulse/actions.ts b/frontend/src/metabase/notifications/pulse/actions.ts
index 15e617867e1..945104bc03a 100644
--- a/frontend/src/metabase/notifications/pulse/actions.ts
+++ b/frontend/src/metabase/notifications/pulse/actions.ts
@@ -1,11 +1,11 @@
import { createAction } from "redux-actions";
import { t } from "ttag";
-import { getActionErrorMessage } from "metabase/actions/utils";
import { subscriptionApi } from "metabase/api";
import { createThunkAction } from "metabase/redux";
import type { DraftDashboardSubscription } from "metabase/redux/store";
import { addUndo } from "metabase/redux/undo";
+import { getResponseErrorMessage } from "metabase/utils/errors";
import type {
ChannelApiResponse,
CreateSubscriptionRequest,
@@ -55,7 +55,9 @@ export const saveEditingPulse = createThunkAction(
).unwrap();
}
} catch (error) {
- const errorMessage = getActionErrorMessage(error);
+ const errorMessage =
+ getResponseErrorMessage(error) ??
+ t`Something went wrong while saving your subscription`;
dispatch(
addUndo({