Skip to content

Commit

Permalink
fix: Fix error message
Browse files Browse the repository at this point in the history
  • Loading branch information
amaury1093 committed Dec 11, 2023
1 parent 3cedb74 commit d51e0de
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/Demo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ export function Demo({ onVerified }: DemoProps): React.ReactElement {
return onVerified && onVerified(r);
})
.catch((err: Error) => {
if (err.message.includes("The result contains 0 rows")) {
// Message can be:
// Results contain 0 rows
// The result contains 0 rows
if (err.message.includes("0 rows")) {
throw new Error(
`The email ${email} can't be verified within 1 minute. This is because the email provider imposes obstacles to prevent real-time email verification, such as greylisting.
Please try again later.`
Expand Down

1 comment on commit d51e0de

@vercel
Copy link

@vercel vercel bot commented on d51e0de Dec 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.