diff --git a/src/global-methods.spec.js b/src/global-methods.spec.js index c09bf8e97..c8c4d6da9 100644 --- a/src/global-methods.spec.js +++ b/src/global-methods.spec.js @@ -38,7 +38,7 @@ it("Global Methods - Call Http Client - Should Reject Promise", () => { isError: true, }); analyticsMixIn.methods.pushEventToGA = jest.fn(); - router.bailout = jest.fn(); + router.handleSoftError = jest.fn(); //Act globalMethods.callHttpClient(httpArgs).catch((err) => { diff --git a/src/router/methods/before-each.js b/src/router/methods/before-each.js index 1796b40d7..67a6ecf84 100644 --- a/src/router/methods/before-each.js +++ b/src/router/methods/before-each.js @@ -108,7 +108,7 @@ export async function beforeEach(to, from) { console.log(error); // Eject user from Vue app in this scenario and clear localstorage. - handleHardError(errorPayload); + await handleHardError(errorPayload); return; } } diff --git a/src/router/methods/error.js b/src/router/methods/error.js index 551df4aed..42807ce04 100644 --- a/src/router/methods/error.js +++ b/src/router/methods/error.js @@ -31,10 +31,10 @@ export async function handleHardError(errorPayload) { window.top.location = "/fmg/static/error"; return; } else { - handleSoftError(errorPayload, true); + await handleSoftError(errorPayload, true); return; } } finally { - handleSoftError(errorPayload, true); + await handleSoftError(errorPayload, true); } }