diff --git a/public/static/assets/Urbanist-Regular.woff b/public/static/assets/Urbanist-Regular.woff
new file mode 100644
index 00000000..7efe9bc4
Binary files /dev/null and b/public/static/assets/Urbanist-Regular.woff differ
diff --git a/public/static/assets/Urbanist-SemiBold.woff b/public/static/assets/Urbanist-SemiBold.woff
new file mode 100644
index 00000000..92949770
Binary files /dev/null and b/public/static/assets/Urbanist-SemiBold.woff differ
diff --git a/public/static/assets/logo.svg b/public/static/assets/logo.svg
new file mode 100644
index 00000000..8f739ca1
--- /dev/null
+++ b/public/static/assets/logo.svg
@@ -0,0 +1,3 @@
+
\ No newline at end of file
diff --git a/public/static/error/index.html b/public/static/error/index.html
new file mode 100644
index 00000000..befcddf4
--- /dev/null
+++ b/public/static/error/index.html
@@ -0,0 +1,432 @@
+
+
+
+
+ Error - Safelite
+
+
+
+
+
+
+
+
+ We encountered an error while processing your appointment. You can return to our site and try scheduling again at a later time.
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/global-methods.js b/src/global-methods.js
index 7c0f3541..3b97b7fd 100644
--- a/src/global-methods.js
+++ b/src/global-methods.js
@@ -7,6 +7,8 @@ import headerKeys from '@/constants/header-keys';
import axiosResponseInterceptorMessages from '@/constants/axios-response-interceptor-messages.js';
import { getSessionKeyValue } from '@/helpers/cookie-helper';
import endpoints from "@/constants/endpoints";
+import queryStrings from '@/constants/query-strings';
+import issPageValues from '@/router/router-constants/issPage-values';
// Add a response interceptor for global axios error handing.
axios.interceptors.response.use(
@@ -48,9 +50,19 @@ axios.interceptors.response.use(
);
export default {
+ getPageNameByQueryString() {
+ const params = new URLSearchParams(location.search);
+
+ if (params.has(queryStrings.ISS_PAGE)) {
+ return params.get(queryStrings.ISS_PAGE);
+ }
+ return '';
+ },
+
callHttpClient({ method, endpoint, payload, logApiCall = true, bailoutOnError = true }) {
return new Promise((resolve, reject) => {
const store = useMainStore();
+ const currentPageName = this.getPageNameByQueryString().toLowerCase();
const cfDistroUrl = applicationConfig.CONSUMER_CF_DISTRO;
const payloadAndAnalyticsData = { ...payload, AppName: 'ISS' };
const sessionKey = getSessionKeyValue();
@@ -103,11 +115,20 @@ export default {
}
if (error.response.status !== 404) {
+ console.error("http call error - page: " + currentPageName + " - bailoutonError: " + bailoutOnError);
const errorData = { method, url, payload, error };
global.$logger.logError(`${method}: ${endpoint}`, errorData);
- if (bailoutOnError && global.bailoutOnAxiosError !== undefined)
- {
- global.bailoutOnAxiosError(errorData);
+
+ if (bailoutOnError && global.bailoutOnAxiosError !== undefined ) {
+ // Check for bailout or entry page here ... if we are on these pages we cannot bailout.
+ if ( currentPageName != issPageValues.ENTRY_PAGE && currentPageName != issPageValues.BAILOUT_PAGE) {
+ global.bailoutOnAxiosError(errorData);
+ }
+ else {
+ console.error("Unable to bailout on the entry page or bailout page.");
+ window.top.location = '/static/error';
+ // TODO: Redirect to a generic static error page.
+ }
}
}
return reject(error.response);