{
  "version": 3,
  "sources": ["../../../src/Err.ts"],
  "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport { BaseError, type BaseErrorOptions } from '@dxos/errors';\nimport { type URI } from '@dxos/keys';\n\nexport class SchemaNotFoundError extends BaseError.extend('SchemaNotFoundError', 'Schema not found') {\n  constructor(schema: string, options?: BaseErrorOptions) {\n    super({ context: { schema }, ...options });\n  }\n}\n\nexport class EntityNotFoundError extends BaseError.extend('EntityNotFoundError', 'Entity not found') {\n  constructor(uri: URI.URI, options?: BaseErrorOptions) {\n    super({ context: { uri }, ...options });\n  }\n}\n\n/**\n * Reason why getting a reactive object from a snapshot failed.\n * - `no-database`: The snapshot is not associated with a database.\n * - `object-not-found`: The object was removed or does not exist in the database.\n */\nexport type GetReactiveErrorReason = 'no-database' | 'object-not-found';\n\n/**\n * Error thrown when a reactive object cannot be resolved from a snapshot.\n * Extends `BaseError` with a `reason` and optional `snapshotId` in its context.\n */\nexport class GetReactiveError extends BaseError.extend(\n  'GetReactiveError',\n  'Failed to get reactive object from snapshot',\n) {\n  constructor(options: { reason: GetReactiveErrorReason; snapshotId?: string } & BaseErrorOptions) {\n    super({ context: { reason: options.reason, snapshotId: options.snapshotId }, ...options });\n  }\n}\n"],
  "mappings": ";;;;;AAAA;;;;;;AAMA,SAASA,iBAAwC;AAG1C,IAAMC,sBAAN,cAAkCD,UAAUE,OAAO,uBAAuB,kBAAA,EAAA;EAC/E,YAAYC,QAAgBC,SAA4B;AACtD,UAAM;MAAEC,SAAS;QAAEF;MAAO;MAAG,GAAGC;IAAQ,CAAA;EAC1C;AACF;AAEO,IAAME,sBAAN,cAAkCN,UAAUE,OAAO,uBAAuB,kBAAA,EAAA;EAC/E,YAAYK,KAAcH,SAA4B;AACpD,UAAM;MAAEC,SAAS;QAAEE;MAAI;MAAG,GAAGH;IAAQ,CAAA;EACvC;AACF;AAaO,IAAMI,mBAAN,cAA+BR,UAAUE,OAC9C,oBACA,6CAAA,EAAA;EAEA,YAAYE,SAAqF;AAC/F,UAAM;MAAEC,SAAS;QAAEI,QAAQL,QAAQK;QAAQC,YAAYN,QAAQM;MAAW;MAAG,GAAGN;IAAQ,CAAA;EAC1F;AACF;",
  "names": ["BaseError", "SchemaNotFoundError", "extend", "schema", "options", "context", "EntityNotFoundError", "uri", "GetReactiveError", "reason", "snapshotId"]
}
