This commit is contained in:
parent
ab145be1aa
commit
869c7ab598
|
@ -241,5 +241,8 @@
|
|||
"The height must be greater than 50cm": "The height must be greater than 50cm",
|
||||
"The maximum height of the wagon is 200cm": "The maximum height of the wagon is 200cm",
|
||||
"The quantity claimed cannot be greater than the quantity of the line": "The quantity claimed cannot be greater than the quantity of the line",
|
||||
"There are tickets for this area, delete them first": "There are tickets for this area, delete them first"
|
||||
"There are tickets for this area, delete them first": "There are tickets for this area, delete them first",
|
||||
"null": "null",
|
||||
"Invalid or expired verification code": "Invalid or expired verification code",
|
||||
"Payment method is required": "Payment method is required"
|
||||
}
|
|
@ -385,5 +385,6 @@
|
|||
"The quantity claimed cannot be greater than the quantity of the line": "La cantidad reclamada no puede ser mayor que la cantidad de la línea",
|
||||
"type cannot be blank": "Se debe rellenar el tipo",
|
||||
"There are tickets for this area, delete them first": "Hay tickets para esta sección, borralos primero",
|
||||
"There is no company associated with that warehouse": "No hay ninguna empresa asociada a ese almacén"
|
||||
"There is no company associated with that warehouse": "No hay ninguna empresa asociada a ese almacén",
|
||||
"The web user's email already exists": "El correo del usuario web ya existe"
|
||||
}
|
|
@ -363,5 +363,6 @@
|
|||
"It has been invoiced but the PDF of refund not be generated": "Il a été facturé mais le PDF de remboursement n'a pas été généré",
|
||||
"Cannot send mail": "Impossible d'envoyer le mail",
|
||||
"Original invoice not found": "Facture originale introuvable",
|
||||
"The quantity claimed cannot be greater than the quantity of the line": "Le montant réclamé ne peut pas être supérieur au montant de la ligne"
|
||||
"The quantity claimed cannot be greater than the quantity of the line": "Le montant réclamé ne peut pas être supérieur au montant de la ligne",
|
||||
"The web user's email already exists": "L'email de l'internaute existe déjà"
|
||||
}
|
||||
|
|
|
@ -363,5 +363,6 @@
|
|||
"It has been invoiced but the PDF of refund not be generated": "Foi faturado mas não foi gerado o PDF do reembolso",
|
||||
"Original invoice not found": "Fatura original não encontrada",
|
||||
"Cannot send mail": "Não é possível enviar o email",
|
||||
"The quantity claimed cannot be greater than the quantity of the line": "O valor reclamado não pode ser superior ao valor da linha"
|
||||
"The quantity claimed cannot be greater than the quantity of the line": "O valor reclamado não pode ser superior ao valor da linha",
|
||||
"The web user's email already exists": "O e-mail do utilizador da web já existe."
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint max-len: ["error", { "code": 150 }]*/
|
||||
const UserError = require('vn-loopback/util/user-error');
|
||||
|
||||
module.exports = function(Self) {
|
||||
|
@ -98,6 +99,8 @@ module.exports = function(Self) {
|
|||
return client;
|
||||
} catch (e) {
|
||||
if (tx) await tx.rollback();
|
||||
if (e.message && e.message.includes(`Email already exists`)) throw new UserError(`The web user's email already exists`);
|
||||
|
||||
throw e;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue