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 {
|
||||
const endpointUrl = `https://${apiHostname}/analytics/api/v1/logging/log-error`;
|
||||
|
||||
const infoString = bailoutInfo.map(
|
||||
const infoString = bailoutInfo?.map(
|
||||
(entry) => `${entry.name}: ${entry.value}`
|
||||
).reduce(
|
||||
)?.reduce(
|
||||
(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, {
|
||||
method: 'POST',
|
||||
|
|
|
|||
|
|
@ -22,11 +22,11 @@ export async function handleSoftError(errorPayload, forceRestart = false) {
|
|||
export async function handleHardError(errorPayload) {
|
||||
try {
|
||||
const isInStaticErrorExperiment = experimentMixin.methods.hasSettingEqualTo(
|
||||
'UseStaticErrorPage',
|
||||
'true'
|
||||
"UseStaticErrorPage",
|
||||
"true"
|
||||
);
|
||||
|
||||
if(isInStaticErrorExperiment) {
|
||||
if (isInStaticErrorExperiment) {
|
||||
analyticsMixin?.methods?.pushPageErrorToDataLayer(errorPayload);
|
||||
window.top.location = "/fmg/static/error";
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in a new issue