Handle no info scenario better + styling
This commit is contained in:
parent
6fe34a4797
commit
7aecf03856
2 changed files with 6 additions and 6 deletions
|
|
@ -268,12 +268,12 @@ body {
|
||||||
try {
|
try {
|
||||||
const endpointUrl = `https://${apiHostname}/analytics/api/v1/logging/log-error`;
|
const endpointUrl = `https://${apiHostname}/analytics/api/v1/logging/log-error`;
|
||||||
|
|
||||||
const infoString = bailoutInfo.map(
|
const infoString = bailoutInfo?.map(
|
||||||
(entry) => `${entry.name}: ${entry.value}`
|
(entry) => `${entry.name}: ${entry.value}`
|
||||||
).reduce(
|
)?.reduce(
|
||||||
(prev, next) => `${prev}\n${next}`
|
(prev, next) => `${prev}\n${next}`
|
||||||
);
|
);
|
||||||
const entryString = `User encountered bailout page.\n${new Date()}\n${infoString}`;
|
const entryString = `User encountered bailout page.\n${new Date()}\n${infoString ?? 'No information recoverable'}`;
|
||||||
|
|
||||||
const request = new Request(endpointUrl, {
|
const request = new Request(endpointUrl, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
|
|
||||||
|
|
@ -22,11 +22,11 @@ export async function handleSoftError(errorPayload, forceRestart = false) {
|
||||||
export async function handleHardError(errorPayload) {
|
export async function handleHardError(errorPayload) {
|
||||||
try {
|
try {
|
||||||
const isInStaticErrorExperiment = experimentMixin.methods.hasSettingEqualTo(
|
const isInStaticErrorExperiment = experimentMixin.methods.hasSettingEqualTo(
|
||||||
'UseStaticErrorPage',
|
"UseStaticErrorPage",
|
||||||
'true'
|
"true"
|
||||||
);
|
);
|
||||||
|
|
||||||
if(isInStaticErrorExperiment) {
|
if (isInStaticErrorExperiment) {
|
||||||
analyticsMixin?.methods?.pushPageErrorToDataLayer(errorPayload);
|
analyticsMixin?.methods?.pushPageErrorToDataLayer(errorPayload);
|
||||||
window.top.location = "/fmg/static/error";
|
window.top.location = "/fmg/static/error";
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue