mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-19 12:19:16 +00:00
improvement: started translation of backend errors
This commit is contained in:
@@ -25,9 +25,7 @@ const DeleteWhatsAppMessage = async (messageId: string): Promise<Message> => {
|
||||
try {
|
||||
await messageToDelete.delete(true);
|
||||
} catch (err) {
|
||||
throw new AppError(
|
||||
"Couldn't delete message from WhatsApp. Check connections page."
|
||||
);
|
||||
throw new AppError("ERR_DELETE_WAPP_MSG");
|
||||
}
|
||||
|
||||
await message.update({ isDeleted: true });
|
||||
|
||||
@@ -31,9 +31,7 @@ const SendWhatsAppMedia = async ({
|
||||
return sentMessage;
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
throw new AppError(
|
||||
"Could not send whatsapp message. Check connections page."
|
||||
);
|
||||
throw new AppError("ERR_SENDING_WAPP_MSG");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -24,9 +24,7 @@ const SendWhatsAppMessage = async ({
|
||||
return sentMessage;
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
throw new AppError(
|
||||
"Could not send whatsapp message. Check connections page."
|
||||
);
|
||||
throw new AppError("ERR_SENDING_WAPP_MSG");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user