1 | const createError = require('create-error');
|
2 |
|
3 | module.exports = {
|
4 | // Thrown when the model is not found and {require: true} is passed in the fetch options
|
5 | NotFoundError: createError('NotFoundError'),
|
6 |
|
7 | // Thrown when the collection is empty and {require: true} is passed in model.fetchAll or
|
8 | // collection.fetch
|
9 | EmptyError: createError('EmptyError'),
|
10 |
|
11 | // Thrown when an update affects no rows and {require: true} is passed in model.save.
|
12 | NoRowsUpdatedError: createError('NoRowsUpdatedError'),
|
13 |
|
14 | // Thrown when a delete affects no rows and {require: true} is passed in model.destroy.
|
15 | NoRowsDeletedError: createError('NoRowsDeletedError')
|
16 | };
|