mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-19 12:19:16 +00:00
improvement: error handling on contact creation
This commit is contained in:
@@ -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];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user