@fireproof/core 0.20.2-dev-preview-3 → 0.20.3-dev-preview-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs CHANGED
@@ -2138,12 +2138,14 @@ var DatabaseImpl = class {
2138
2138
  if (!id) throw this.logger.Error().Str("db", this.name).Msg(`Doc id is required`).AsError();
2139
2139
  await this.ready();
2140
2140
  this.logger.Debug().Str("id", id).Msg("get");
2141
- const got = await this.ledger.crdt.get(id).catch((e) => {
2142
- throw new NotFoundError(`Not found: ${id} - ${e.message}`);
2143
- });
2144
- if (!got) throw new NotFoundError(`Not found: ${id}`);
2145
- const { doc } = got;
2146
- return { ...doc, _id: id };
2141
+ try {
2142
+ const got = await this.ledger.crdt.get(id);
2143
+ if (!got) throw new NotFoundError(`Not found: ${id}`);
2144
+ const { doc } = got;
2145
+ return { ...doc, _id: id };
2146
+ } catch (e) {
2147
+ throw new NotFoundError(`Not found: ${id} - ${e instanceof Error ? e.message : String(e)}`);
2148
+ }
2147
2149
  }
2148
2150
  async put(doc) {
2149
2151
  await this.ready();
@@ -7263,6 +7265,6 @@ function buildResDelWAL(msgCtx, req, ctx) {
7263
7265
 
7264
7266
  // src/version.ts
7265
7267
  var PACKAGE_VERSION = Object.keys({
7266
- "0.20.2-dev-preview-3": "xxxx"
7268
+ "0.20.3-dev-preview-1": "xxxx"
7267
7269
  })[0];
7268
7270
  //# sourceMappingURL=index.cjs.map