export class OsdError extends Error { constructor ( message ) { super ( message ) ; Object . setPrototypeOf ( this , new . target . prototype ) ; } } param { String } name export class DuplicateField extends OsdError { constructor ( name ) { super ( `The field "${ name }" already exists in this mapping` ) ; } } /**
 * A saved object was not found
 */ export class SavedObjectNotFound extends OsdError { public savedObjectType : string ; public savedObjectId ? : string ; constructor ( type , id ? , link ? ) { const idMsg = id ? ` (id: ${ id })` : '' ; let message = `Could not locate that ${ type }${ idMsg }` ; if ( link ) { message += `, [click here to re-create it](${ link })` ; } super ( message ) ; this . savedObjectType = type ; this . savedObjectId = id ; } } /**
 * This error is for scenarios where a saved object is detected that has invalid JSON properties.
 * There was a scenario where we were importing objects with double-encoded JSON, and the system
 * was silently failing. This error is now thrown in those scenarios.
 */ export class InvalidJSONProperty extends OsdError { constructor ( message ) { super ( message ) ; } }