diff --git a/x-pack/legacy/plugins/uptime/common/runtime_types/monitor/monitor_details.ts b/x-pack/legacy/plugins/uptime/common/runtime_types/monitor/monitor_details.ts index 246b9c22a08d7..0a57a67b898e0 100644 --- a/x-pack/legacy/plugins/uptime/common/runtime_types/monitor/monitor_details.ts +++ b/x-pack/legacy/plugins/uptime/common/runtime_types/monitor/monitor_details.ts @@ -6,17 +6,18 @@ import * as t from 'io-ts'; // IO type for validation -export const ErrorType = t.partial({ +export const MonitorErrorType = t.partial({ code: t.number, message: t.string, type: t.string, }); // Typescript type for type checking -export type Error = t.TypeOf; +export type MonitorError = t.TypeOf; export const MonitorDetailsType = t.intersection([ t.type({ monitorId: t.string }), - t.partial({ error: ErrorType }), + t.partial({ error: MonitorErrorType }), + t.partial({ timestamp: t.string }), ]); export type MonitorDetails = t.TypeOf; diff --git a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/__tests__/__snapshots__/most_recent_error.test.tsx.snap b/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/__tests__/__snapshots__/most_recent_error.test.tsx.snap index cdda21b75770a..5c1fe27d234a3 100644 --- a/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/__tests__/__snapshots__/most_recent_error.test.tsx.snap +++ b/x-pack/legacy/plugins/uptime/public/components/functional/monitor_list/monitor_list_drawer/__tests__/__snapshots__/most_recent_error.test.tsx.snap @@ -1,12 +1,12 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`MostRecentError component renders properly with empty data 1`] = ` +exports[`MostRecentError component renders properly with mock data 1`] = ` Array [

- Most recent error + Most recent error (5 days ago)

,