From 95b3ef7cc68f7276cb42f3c786e369c06f283539 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Tue, 6 Aug 2024 06:36:23 -0400 Subject: [PATCH] Added back router.navigateError for errors other than 404. --- src/global-methods.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/global-methods.js b/src/global-methods.js index 85fd02841..1c37ae92d 100644 --- a/src/global-methods.js +++ b/src/global-methods.js @@ -56,12 +56,16 @@ export default { additionalSuccessEventDataHandler, }) { return new Promise((resolve, reject) => { - const cfDistroUrl = applicationConfig.CONSUMER_CF_DISTRO; + let cfDistroUrl = applicationConfig.CONSUMER_CF_DISTRO; const payloadAndAnalyticsData = Object.assign({}, payload, { AppName: "FixMyGlass" }); const headers = { [headerKeys.EXPERIMENT]: JSON.stringify(store.getters.experimentSettings), }; + if (endpoint.includes("/vehicle/api/v1/vehicle/")) { + cfDistroUrl = "https://localhost:5001"; + } + axios({ method: method, url: cfDistroUrl + endpoint, @@ -100,7 +104,7 @@ export default { if (error.response.status != "404") { // Do not route to error logic when no wipers found or no promo found (404s) - // router.navigateError(); Emergency change for testing - skiener 03/12 + router.navigateError(); // do not log 404 errors from services because we return NotFound // when a service doesn't return an object