Sequelize provides a host of custom error classes, to allow you to do easier debugging. All of these errors are exposed on the sequelize object and the sequelize constructor. All sequelize errors inherit from the base JS error object.
The Base Error all Sequelize Errors inherit from. Aliases: Error
new ValidationError(message, [errors])
Validation Error. Thrown when the sequelize validation has failed. The error contains an
which is an array with 1 or more ValidationErrorItems, one for each validation that failed.
|[errors]||Array||Array of ValidationErrorItem objects describing the validation errors|
An array of ValidationErrorItems
Gets all validation error items for the path / field specified.
|path||string||The path to be checked for error items|
A base class for all database related errors.
The database specific error which triggered this one
The SQL that triggered the error
The message from the DB.
The fields of the unique constraint
The value(s) which triggered the error
The name of the index that triggered the error
Thrown when a database query times out because of a deadlock
Thrown when a unique constraint is violated in the database
Thrown when a foreign key constraint is violated in the database
Thrown when an exclusion constraint is violated in the database
new ValidationErrorItem(message, type, path, value)
Validation Error Item
Instances of this class are included in the
|message||string||An error message|
|type||string||The type of the validation error|
|path||string||The field that triggered the validation error|
|value||string||The value that generated the error|
A base class for all connection related errors.
The connection specific error which triggered this one
Thrown when a connection to a database is refused
Thrown when a connection to a database is refused due to insufficient privileges
Thrown when a connection to a database has a hostname that was not found
Thrown when a connection to a database has a hostname that was not reachable
Thrown when a connection to a database has invalid values for any of the connection parameters
Thrown when a connection to a database times out
Thrown when a some problem occurred with Instance methods (see message for details)
This document is automatically generated based on source code comments. Please do not edit it directly, as your changes will be ignored. Please write on IRC, open an issue or a create a pull request if you feel something can be improved. For help on how to write source code documentation see JSDoc and dox