Skip to content

Harden NotFound detection in upsert; improved debug logging

Choose a tag to compare

released this 26 Oct 01:38
· 34 commits to working since this release

This release focuses on making the upsert operation more robust when handling not-found errors and improving related diagnostics.

Improvements

  • Harden NotFound detection in src/ops/upsert.ts so upsert treats an error as not-found if any of the following are true: instanceof NotFoundError, error.name === 'NotFoundError', or error.errorInfo.code === 'NOT_FOUND' (b0c737d). This addresses cases where module duplication can break instanceof checks.
  • Enrich the debug log when creating a missing item to include errorType and errorCode alongside the key, aiding troubleshooting (b0c737d).
  • Remove redundant logger.error for unexpected get errors; such errors are now rethrown directly to avoid double-logging (b0c737d).