Replace ValidationError by ApplicationError in services & lifecycles

This commit is contained in:
2023-04-02 12:25:52 +04:00
parent a65b3f04e8
commit d61ef75869
5 changed files with 18 additions and 16 deletions
@@ -5,7 +5,7 @@
* to customize this model
*/
const { ValidationError } = require("@strapi/utils").errors
const { ApplicationError } = require("@strapi/utils").errors
const slugify = require('slugify')
const jwennTeksEpiId = async data => {
@@ -20,7 +20,7 @@ const jwennAwtisEpiId = async id => {
const validateArtiste = alias => {
if (!alias || alias.trim().length === 0) {
throw new ValidationError('Champ obligatoire. Veuillez choisir un alias.');
throw new ApplicationError('Champ obligatoire. Veuillez choisir un alias.');
}
}