Skip to content

onError() handler is sometimes called with internal ReturnNullException #2603

@lehni

Description

@lehni

When overriding Model.query() as follows and running upsertGraph() commands on such a model, the onError()callback is called with the internally used ReturnNullException.

class Model extends objection.Model {
  static query(trx) {
    return super.query(trx).onError(err => {
      console.error(err);
    })
  }
}

This is caused by my fix in #2452 for #2233

I have a fix coming up for this issue.

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