Skip to content

NotNullViolationError does not exist in typings #1607

@e1337us3r

Description

@e1337us3r

I switched to v2 this morning and got the following error in my error handler middleware:

TS2305: Module '"../../node_modules/objection/typings/objection"' has no exported member 'NotNullViolationError'.

I checked the typings file, NotNullViolationError really does not exist there.

Fix: NotNullViolationError originates from db-errors so a simple export in typings file will fix the 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