Skip to content

Insert operation silently failing #368

@Sherlouk

Description

@Sherlouk

Is your feature request related to a problem? Please describe.

This was originally raised under #360, and I ran into it today (discussed on Discord). There's a frustrating case where when inserting a single document, if it violates an index uniqueness check, will silently fail (returns an "OK").

While this is probably sensible for multi-document (bulk) operations, for single ops... it'd a bit misleading. At a bare minimum we should have an array of errors on the reply object but...

Describe the solution you'd like

but... ideally, for single-document operations it would fail (throw an error) outright if we get an insert count of zero for an insert operation.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions