diff --git a/x-pack/plugins/maps/public/classes/sources/es_source/es_source.ts b/x-pack/plugins/maps/public/classes/sources/es_source/es_source.ts index d37f02a079a2..da37b796cdf5 100644 --- a/x-pack/plugins/maps/public/classes/sources/es_source/es_source.ts +++ b/x-pack/plugins/maps/public/classes/sources/es_source/es_source.ts @@ -408,7 +408,7 @@ export class AbstractESSource extends AbstractVectorSource implements IESSource if (!geoField) { throw new Error( i18n.translate('xpack.maps.source.esSource.noGeoFieldErrorMessage', { - defaultMessage: `Data view "{indexPatternLabel}"" no longer contains the geo field "{geoField}"`, + defaultMessage: `Data view "{indexPatternLabel}" no longer contains the geo field "{geoField}"`, values: { indexPatternLabel: indexPattern.getName(), geoField: this.getGeoFieldName() }, }) ); diff --git a/x-pack/plugins/maps/public/embeddable/map_embeddable.tsx b/x-pack/plugins/maps/public/embeddable/map_embeddable.tsx index 834023182f45..e2377ebd2e88 100644 --- a/x-pack/plugins/maps/public/embeddable/map_embeddable.tsx +++ b/x-pack/plugins/maps/public/embeddable/map_embeddable.tsx @@ -794,7 +794,6 @@ export class MapEmbeddable } const hiddenLayerIds = getHiddenLayerIds(this._savedMap.getStore().getState()); - if (!_.isEqual(this.input.hiddenLayers, hiddenLayerIds)) { this.updateInput({ hiddenLayers: hiddenLayerIds, @@ -802,14 +801,7 @@ export class MapEmbeddable } const isLoading = isMapLoading(this._savedMap.getStore().getState()); - const firstLayerWithError = getLayerList(this._savedMap.getStore().getState()).find((layer) => { - return layer.hasErrors(); - }); - const output = this.getOutput(); - if ( - output.loading !== isLoading || - firstLayerWithError?.getErrors() !== output.error?.message - ) { + if (this.getOutput().loading !== isLoading) { /** * Maps emit rendered when the data is loaded, as we don't have feedback from the maps rendering library atm. * This means that the DASHBOARD_LOADED_EVENT event might be fired while a map is still rendering in some cases. @@ -817,13 +809,10 @@ export class MapEmbeddable */ this.updateOutput({ loading: isLoading, - rendered: !isLoading && firstLayerWithError === undefined, - error: firstLayerWithError - ? { - name: 'EmbeddableError', - message: firstLayerWithError.getErrors(), - } - : undefined, + rendered: !isLoading, + // do not surface layer errors as output.error + // output.error blocks entire embeddable display and prevents map from displaying + // layer errors are better surfaced in legend while still keeping the map usable }); } }