Skip to main content
Version: 3.0 Alpha

Errors

The ORM uses the following error classes from @zenstackhq/runtime to represent different types of failures:

ValidationError​

This error is thrown when the argument passed to the ORM methods is invalid, e.g., missing required fields, or containing unknown fields. The cause property is set to the original error thrown during validation.

NotFoundError​

This error is thrown when a requested record is not found in the database, e.g., when calling findUniqueOrThrow, update, etc.

QueryError​

This error is used to encapsulate all other errors thrown from the underlying database driver. The cause property is set to the original error thrown.

Comments
Feel free to ask questions, give feedback, or report issues.

Don't Spam


You can edit/delete your comments by going directly to the discussion, clicking on the 'comments' link below