🔊 Improve toast error when whatsapp token is not valid
This commit is contained in:
@@ -158,6 +158,10 @@ export const WhatsAppCredentialsModal = ({
|
|||||||
setIsVerifying(false)
|
setIsVerifying(false)
|
||||||
showToast({
|
showToast({
|
||||||
description: 'Could not get system info',
|
description: 'Could not get system info',
|
||||||
|
details:
|
||||||
|
err instanceof Error
|
||||||
|
? { content: err.message, lang: 'json' }
|
||||||
|
: undefined,
|
||||||
})
|
})
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
@@ -204,7 +208,10 @@ export const WhatsAppCredentialsModal = ({
|
|||||||
setIsVerifying(false)
|
setIsVerifying(false)
|
||||||
showToast({
|
showToast({
|
||||||
description: 'Could not get phone number info',
|
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
|
return false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user