Merge pull request #2612 from Safelite/feature/CASH-1029-techreview
Check against constant
This commit is contained in:
parent
1267486308
commit
a1edf6a01a
1 changed files with 2 additions and 1 deletions
|
|
@ -9,6 +9,7 @@ import { GaCategories, GaActions, GaLabels } from "@/constants/analytics";
|
||||||
import { getSessionKeyValue } from "@/helpers/heritage-integration/cookie-helper";
|
import { getSessionKeyValue } from "@/helpers/heritage-integration/cookie-helper";
|
||||||
import { headerKeys } from "@/constants/header-keys";
|
import { headerKeys } from "@/constants/header-keys";
|
||||||
import axiosResponseInterceptorMessages from "@/constants/axios-response-interceptor-messages.js";
|
import axiosResponseInterceptorMessages from "@/constants/axios-response-interceptor-messages.js";
|
||||||
|
import { endpoints } from "@/constants/endpoints";
|
||||||
|
|
||||||
// Add a response interceptor for global axios error handing.
|
// Add a response interceptor for global axios error handing.
|
||||||
axios.interceptors.response.use(
|
axios.interceptors.response.use(
|
||||||
|
|
@ -100,7 +101,7 @@ export default {
|
||||||
return resolve(response);
|
return resolve(response);
|
||||||
},
|
},
|
||||||
(error) => {
|
(error) => {
|
||||||
if (endpoint.toLowerCase().includes("/digitalconsumer-log")) {
|
if (endpoint.toLowerCase().includes(endpoints.LogDigitalConsumer.url)) {
|
||||||
return resolve({ data: null, error: "Ignore errors when logging" });
|
return resolve({ data: null, error: "Ignore errors when logging" });
|
||||||
} else {
|
} else {
|
||||||
if (logApiCall) {
|
if (logApiCall) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue