refactor
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
fec965a8dd
commit
21a62a0fab
|
@ -4,8 +4,8 @@ module.exports = Self => {
|
||||||
require('../methods/item-tag/filterItemTags')(Self);
|
require('../methods/item-tag/filterItemTags')(Self);
|
||||||
|
|
||||||
Self.rewriteDbError(function(err) {
|
Self.rewriteDbError(function(err) {
|
||||||
// if (err.code === 'ER_DUP_ENTRY')
|
if (err.code === 'ER_DUP_ENTRY')
|
||||||
// return new UserError(`The tag or priority can't be repeated for an item`);
|
return new UserError(`The tag or priority can't be repeated for an item`);
|
||||||
if (err.code === 'ER_BAD_NULL_ERROR')
|
if (err.code === 'ER_BAD_NULL_ERROR')
|
||||||
return new UserError(`Tag value cannot be blank`);
|
return new UserError(`Tag value cannot be blank`);
|
||||||
return err;
|
return err;
|
||||||
|
|
Loading…
Reference in New Issue