Skip to content

Commit

Permalink
馃攰 Improve toast error when whatsapp token is not valid
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Apr 9, 2024
1 parent b6a31c2 commit 3b1b464
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 3b1b464

Please sign in to comment.