diff --git a/plugins/new-relic-dashboard/src/components/NewRelicDashboard/DashboardEntityList.tsx b/plugins/new-relic-dashboard/src/components/NewRelicDashboard/DashboardEntityList.tsx index 5fc17e4fd4..71aeecbc93 100644 --- a/plugins/new-relic-dashboard/src/components/NewRelicDashboard/DashboardEntityList.tsx +++ b/plugins/new-relic-dashboard/src/components/NewRelicDashboard/DashboardEntityList.tsx @@ -55,7 +55,13 @@ export const DashboardEntityList = () => { - {value.getDashboardEntity.data.actor.entitySearch.results.entities.map( + {value?.getDashboardEntity === undefined && + 'Unauthorized Request , please check API Key'} + {value?.getDashboardEntity?.data.actor.entitySearch.results.entities + .length <= 0 && ( + <>No Dashboard Pages found with the specified Dashboard GUID + )} + {value?.getDashboardEntity?.data.actor.entitySearch.results.entities?.map( (entity: any) => { return ( diff --git a/plugins/new-relic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshotList.tsx b/plugins/new-relic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshotList.tsx index f0d9b58599..e05af18a36 100644 --- a/plugins/new-relic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshotList.tsx +++ b/plugins/new-relic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshotList.tsx @@ -109,7 +109,7 @@ export const DashboardSnapshotList = ({ guid }: Props) => { value={value1} style={{ width: '100%' }} > - {value.getDashboardEntity.data.actor.entitySearch.results.entities?.map( + {value?.getDashboardEntity?.data?.actor.entitySearch.results.entities?.map( (Entity: any, index: any) => { return ( { }, )} - {value.getDashboardEntity.data.actor.entitySearch.results.entities?.map( + {value?.getDashboardEntity?.data?.actor.entitySearch.results.entities?.map( (Entity: any, index: any) => { return (