Skip to content
This repository was archived by the owner on Nov 21, 2026. It is now read-only.
This repository was archived by the owner on Nov 21, 2026. It is now read-only.

AsyncExecutor.create_record takes no error callback, so a rejected record is lost unless on_error is set #14

Closed

Description

@tae898

AsyncExecutor.create_record(document, callback=None) has no way to hear about a record the engine rejects (a duplicate key under a UNIQUE index, for example): the failure goes only to the executor-wide on_error handler, and without one it is logged and the record is gone. The engine has the overload for it, DatabaseAsyncExecutor.createRecord(record, newRecordCallback, errorCallback), and insert_many(parallel=True) already uses it to raise instead of dropping records (BUGS-style fix in 4685ba00f5).

Proposed: create_record(document, callback=None, error_callback=None), where error_callback receives the exception for that record, through the three-argument overload. Additive; existing calls are unchanged.

Activity

  1. added a commit that references this issue on Sep 29, 2026
    ed36dba
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions