import { i18n } from '@osd/i18n' ; export class PanelNotFoundError extends Error { code = 'PANEL_NOT_FOUND' ; constructor ( ) { super ( i18n . translate ( 'embeddableApi.errors.paneldoesNotExist' , { defaultMessage : 'Panel not found' , } ) ) ; } } export class EmbeddableFactoryNotFoundError extends Error { code = 'EMBEDDABLE_FACTORY_NOT_FOUND' ; constructor ( type ) { super ( i18n . translate ( 'embeddableApi.errors.embeddableFactoryNotFound' , { defaultMessage : `{type} can't be loaded. Please upgrade to the default distribution of OpenSearch and OpenSearch Dashboards with the appropriate license.` , values : { type , } , } ) ) ; } }