pop vehicle error #1672
|
@ -2,7 +2,7 @@ let UserError = require('vn-loopback/util/user-error');
|
|||
|
||||
module.exports = Self => {
|
||||
Self.rewriteDbError(function(err) {
|
||||
if (err.code === 'ER_ROW_IS_REFERENCED')
|
||||
if (err.code === 'ER_ROW_IS_REFERENCED_2')
|
||||
return new UserError(`This invoice has a linked vehicle.`);
|
||||
return err;
|
||||
});
|
Loading…
Reference in New Issue