refactor
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Vicent Llopis 2023-01-03 13:29:44 +01:00
parent fec965a8dd
commit 21a62a0fab
1 changed files with 2 additions and 2 deletions

View File

@ -4,8 +4,8 @@ module.exports = Self => {
require('../methods/item-tag/filterItemTags')(Self);
Self.rewriteDbError(function(err) {
// if (err.code === 'ER_DUP_ENTRY')
// return new UserError(`The tag or priority can't be repeated for an item`);
if (err.code === 'ER_DUP_ENTRY')
return new UserError(`The tag or priority can't be repeated for an item`);
if (err.code === 'ER_BAD_NULL_ERROR')
return new UserError(`Tag value cannot be blank`);
return err;