couchbaselabs / couchbaselabs/node-ottoman

DocumentNotFoundError in findOne method

Open
#783 3 comments 3 reactions 1 assignee Claimed by @ebenhaber View on GitHub
Dominant language
TypeScript
Stars
295
Forks
99
PR merge metrics
No merged PRs in 30d

Description

We use `Ottoman` as an ORM in our project,

When we use the `findOne` method, and the item is not found on the server, it responds with a `DocumentNotFoundError` even though we have set the `enforceRefCheck` property to true . This property is intended to enforce reference checks, but it seems ignored.

We found in your source code that you just checked the length of response data, and you ignored the `enforceRefCheck` property,
![image](https://github.com/user-attachments/assets/c37f2625-62c4-4452-b1ee-6615e597fe42)

My first question is, Why do you ignore `enforceRefCheck` ?
And, How can we ignore this error in the`2.4.0` version ?

We don't need to throw an error when a document is not found on the server.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.