added UserError
This commit is contained in:
parent
0926e481ed
commit
df85500ab5
|
@ -23,7 +23,7 @@ module.exports = Self => {
|
||||||
|
|
||||||
Self.removes = async params => {
|
Self.removes = async params => {
|
||||||
if (!params.rows || !params.rows.length)
|
if (!params.rows || !params.rows.length)
|
||||||
throw new Error('There is nothing delete');
|
throw new UserError('There is nothing delete');
|
||||||
|
|
||||||
await Self.app.models.Order.isEditable(params.actualOrderId);
|
await Self.app.models.Order.isEditable(params.actualOrderId);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue