feat: return sql check error
This commit is contained in:
parent
8aea57e8f9
commit
cca62ae902
|
@ -366,5 +366,6 @@
|
||||||
"It has been invoiced but the PDF could not be generated": "Se ha facturado pero no se ha podido generar el PDF",
|
"It has been invoiced but the PDF could not be generated": "Se ha facturado pero no se ha podido generar el PDF",
|
||||||
"It has been invoiced but the PDF of refund not be generated": "Se ha facturado pero no se ha podido generar el PDF del abono",
|
"It has been invoiced but the PDF of refund not be generated": "Se ha facturado pero no se ha podido generar el PDF del abono",
|
||||||
"Payment method is required": "El método de pago es obligatorio",
|
"Payment method is required": "El método de pago es obligatorio",
|
||||||
"Cannot send mail": "Não é possível enviar o email"
|
"Cannot send mail": "Não é possível enviar o email",
|
||||||
|
"CONSTRAINT `supplierAccountTooShort` failed for `vn`.`supplier`": "La cuenta debe tener exactamente 10 dígitos"
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ module.exports = function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// MySQL user-defined exceptions
|
// MySQL user-defined exceptions
|
||||||
if (err.sqlState == '45000')
|
if (err.sqlState == '45000' || err?.errno == 4025)
|
||||||
return next(new UserError(req.__(err.sqlMessage)));
|
return next(new UserError(req.__(err.sqlMessage)));
|
||||||
|
|
||||||
// Logs error to console
|
// Logs error to console
|
||||||
|
|
Loading…
Reference in New Issue