2
0

🧑‍💻 (whatsapp) Improve whatsapp start log

This commit is contained in:
Baptiste Arnaud
2023-10-25 14:26:10 +02:00
parent 1ff58818a9
commit c2a08c482e
2 changed files with 8 additions and 5 deletions

View File

@ -75,10 +75,10 @@ export const resumeWhatsAppFlow = async ({
credentials: { ...credentials, id: credentialsId as string },
contact,
})
: undefined
: { error: 'workspaceId not found' }
if (!resumeResponse) {
console.error('Could not find or create session', sessionId)
if ('error' in resumeResponse) {
console.log('Chat not starting:', resumeResponse.error)
return {
message: 'Message received',
}