improvement: error handling on contact creation

This commit is contained in:
canove
2020-09-24 13:49:38 -03:00
parent e6641bde39
commit 34a99ade2d
3 changed files with 7 additions and 4 deletions

View File

@@ -92,7 +92,9 @@ export const getWbot = (whatsappId: number): Session => {
const sessionIndex = sessions.findIndex(s => s.id === whatsappId);
if (sessionIndex === -1) {
throw new AppError("This WhatsApp session is not initialized.");
throw new AppError(
"This WhatsApp session is not initialized. Check connections page."
);
}
return sessions[sessionIndex];
};