You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// The failing responses fail the evaluation loader on purpose; kea-loaders would log each
516
+
beforeEach(silenceKeaLoadersErrors)
517
+
afterEach(resumeKeaLoadersErrors)
518
+
519
+
it.each([
520
+
{
521
+
description: 'maps a timestamp failure in the error field',
522
+
status: 500,
523
+
body: {error: 'Failed to build person properties at specified timestamp.'},
524
+
expectedError:
525
+
'Unable to build person properties at the selected timestamp. This person may not have had any recorded activity at that time, or the timestamp may be too far in the past.',
526
+
},
527
+
{
528
+
description: 'maps an invalid timestamp in the error field',
529
+
status: 400,
530
+
body: {error: 'Invalid timestamp format.'},
531
+
expectedError: 'Invalid timestamp. Please select a valid date and time.',
532
+
},
533
+
{
534
+
description: 'keeps a specific timestamp reason as is',
535
+
status: 400,
536
+
body: {error: "Feature flag 'test-flag' did not exist at the specified timestamp."},
537
+
expectedError: "Feature flag 'test-flag' did not exist at the specified timestamp.",
538
+
},
539
+
{
540
+
description: 'maps a missing person in the detail field',
541
+
status: 404,
542
+
body: {detail: 'Person not found for person_id: abc'},
543
+
expectedError: 'Person not found. This person may not have existed at the selected timestamp.',
if(errorDetail.includes('Failed to build person properties at specified timestamp')){
81
-
return'Unable to build person properties at the selected timestamp. This person may not have had any recorded activity at that time, or the timestamp may be too far in the past.'
return'Invalid timestamp. Please select a valid date and time.'
90
-
}
92
+
if(lowerMessage.includes('failed to build person properties at specified timestamp')){
93
+
return'Unable to build person properties at the selected timestamp. This person may not have had any recorded activity at that time, or the timestamp may be too far in the past.'
return'Person not found. This person may not have existed at the selected timestamp.'
93
98
}
94
99
95
-
consterrorMessage=apiError?.message||error||''
96
-
if(errorMessage.includes('Failed to build person properties at specified timestamp')){
97
-
return'Unable to build person properties at the selected timestamp. This person may not have had any recorded activity at that time, or the timestamp may be too far in the past.'
0 commit comments