Closed CodMoncai closed 4 years ago
That's odd. the handler of that route does not explicitly return 400
in any case. It might have come from sgMail.send
. Can you try wrap that function with a try catch and log the error?
Likely due to https://github.com/hoangvvo/nextjs-mongodb-app/issues/85. Using your own SendGrid token should work.
I ran into a 500 error when attempting to verify my email address. After debugging it looks like sendgrid is requiring the subject property to be included in the message object.
Could not send email: Bad Request Bad Request (400) The subject is required. You can get around this requirement if you use a template with a subject defined or if every personalization has a subject defined. subject http://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/errors.html#message.subject
I get the following error locally and also on a remote server. I have added in my own SendGrid API key, but I still get the following error. The path is valid and exists in the file structure.
Failed to load resource: the server responded with a status of 400 (Bad Request) for route - /api/user/email/verify