import { SavedObject } from '../../../types' ; public export class SavedObjectsExportError extends Error { constructor ( public readonly type , message , public readonly attributes ? ) { super ( message ) ; Object . setPrototypeOf ( this , SavedObjectsExportError . prototype ) ; } static exportSizeExceeded ( limit ) { return new SavedObjectsExportError ( 'export-size-exceeded' , `Can't export more than ${ limit } objects. ` + 'If your server has enough memory, this limit can be increased ' + 'by adjusting the "savedObjects.maxImportExportSize" setting.' ) ; } static objectFetchError ( objects ) { return new SavedObjectsExportError ( 'object-fetch-error' , 'Error fetching objects to export' , { objects , } ) ; } /**
     * Error returned when a  SavedObjectsExportTransform threw an error
      static objectTransformError ( objects , cause ) { return new SavedObjectsExportError ( 'object-transform-error' , 'Error transforming objects to export' , { objects , cause : cause . message , } ) ; } /**
     * Error returned when a  SavedObjectsExportTransform performed an invalid operation
     * during the transform, such as removing objects from the export, or changing an object's type or id.
      static invalidTransformError ( objectKeys ) { return new SavedObjectsExportError ( 'invalid-transform-error' , 'Invalid transform performed on objects to export' , { objectKeys , } ) ; } }