mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-19 12:19:16 +00:00
improvement: translated all backend errors messages
This commit is contained in:
@@ -7,7 +7,7 @@ const DeleteWhatsApprService = async (id: string): Promise<void> => {
|
||||
});
|
||||
|
||||
if (!whatsapp) {
|
||||
throw new AppError("No whatsapp found with this ID.", 404);
|
||||
throw new AppError("ERR_NO_WAPP_FOUND", 404);
|
||||
}
|
||||
|
||||
await whatsapp.destroy();
|
||||
|
||||
@@ -7,7 +7,7 @@ const ShowWhatsAppService = async (
|
||||
const whatsapp = await Whatsapp.findByPk(id);
|
||||
|
||||
if (!whatsapp) {
|
||||
throw new AppError("No whatsapp found with this conditions.", 404);
|
||||
throw new AppError("ERR_NO_WAPP_FOUND", 404);
|
||||
}
|
||||
|
||||
return whatsapp;
|
||||
|
||||
@@ -51,7 +51,7 @@ const UpdateWhatsAppService = async ({
|
||||
});
|
||||
|
||||
if (!whatsapp) {
|
||||
throw new AppError("No whatsapp found with this ID.", 404);
|
||||
throw new AppError("ERR_NO_WAPP_FOUND", 404);
|
||||
}
|
||||
|
||||
await whatsapp.update({
|
||||
|
||||
Reference in New Issue
Block a user