2
0

🔊 Improve toast error when whatsapp token is not valid

This commit is contained in:
Baptiste Arnaud
2024-04-09 14:40:05 +02:00
parent b6a31c2944
commit 3b1b464890

View File

@ -158,6 +158,10 @@ export const WhatsAppCredentialsModal = ({
setIsVerifying(false)
showToast({
description: 'Could not get system info',
details:
err instanceof Error
? { content: err.message, lang: 'json' }
: undefined,
})
return false
}
@ -204,7 +208,10 @@ export const WhatsAppCredentialsModal = ({
setIsVerifying(false)
showToast({
description: 'Could not get phone number info',
details: { content: JSON.stringify(err), lang: 'json' },
details:
err instanceof Error
? { content: err.message, lang: 'json' }
: undefined,
})
return false
}