Integrate experiment toggle
This commit is contained in:
parent
487f380c1e
commit
3fa55f6dea
1 changed files with 13 additions and 2 deletions
|
|
@ -4,6 +4,7 @@ import router from "@/router";
|
||||||
import store from "@/store";
|
import store from "@/store";
|
||||||
import { storeActions } from "@/constants/store-actions";
|
import { storeActions } from "@/constants/store-actions";
|
||||||
import { deleteFunnelCookie } from "@/helpers/heritage-integration/cookie-helper";
|
import { deleteFunnelCookie } from "@/helpers/heritage-integration/cookie-helper";
|
||||||
|
import experimentMixin from "../../mixins/experiment-mixin";
|
||||||
|
|
||||||
export async function handleSoftError(errorPayload, forceRestart = false) {
|
export async function handleSoftError(errorPayload, forceRestart = false) {
|
||||||
if (forceRestart) {
|
if (forceRestart) {
|
||||||
|
|
@ -20,8 +21,18 @@ export async function handleSoftError(errorPayload, forceRestart = false) {
|
||||||
|
|
||||||
export async function handleHardError(errorPayload) {
|
export async function handleHardError(errorPayload) {
|
||||||
try {
|
try {
|
||||||
analyticsMixin?.methods?.pushPageErrorToDataLayer(errorPayload);
|
const isInStaticErrorExperiment = experimentMixin.methods.hasSettingEqualTo(
|
||||||
|
'UseStaticErrorPage',
|
||||||
|
'true'
|
||||||
|
);
|
||||||
|
|
||||||
|
if(isInStaticErrorExperiment) {
|
||||||
|
analyticsMixin?.methods?.pushPageErrorToDataLayer(errorPayload);
|
||||||
|
window.top.location = "/fmg/static/error";
|
||||||
|
} else {
|
||||||
|
handleSoftError(errorPayload, true);
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
window.top.location = "/fmg/static/error/";
|
handleSoftError(errorPayload, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue