New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UnhandledPromiseRejectionWarning: Error: Bad Request #920
Comments
@AWR14, |
@hkadyanji, (and anyone else coming along) oddly enough I have discovered that if I do not provide all the fields AND ensure they at least have a space, I get the error -- instead of setting a field to "", I set it to " " (space inside the quotes) and it solved my issue -- I find this quite odd but fixed is better than broken. :) If anyone has any feedback/insight, I'm eager to know... In fairness, I did not test the to: and from: fields for allowing blanks as they usually have a value in my app so didn't see the need. I will air on the safe side and just ensure any missing field has at least a space until proved otherwise in a future version. But then again, who am I kidding; I'm not likely to visit this code again until something else breaks... lol I'm using "@sendgrid/mail": "^6.4.0" |
did the issue get resolve, i am facing the same error but in different context of bot. BotFrameworkAdapter.processActivity(): 500 ERROR - Error: Bad Request |
I hit the same warning, but it was my mistake that has a typo issue, instead of To make it worked again, make sure the to email & keys are valid.
|
In my case, this error occur is because i did not use await before And, the error reason is Remove the repeated emails in |
There are 2 issues here: making bad requests and not properly handling promise rejections. For the latter, you'll either need to use the send promise result to determine when to respond to your API call or use |
Now the new link is this one, actually: https://github.com/sendgrid/sendgrid-nodejs/blob/master/docs/use-cases/success-failure-errors.md ;) But its a BEAUTIFUL tip cause now its possbile to understand whats is the real error! Thanx! |
Exactly, you have to check the email status inside the sendgrid admin |
In my case I was using scheduled email sending, and set scheduled date in milliseconds as opposed to seconds. The api works with Unix timestamp in seconds(see docs). |
Getting the following error:
My code is in express and node as part of a nextjs app:
"@sendgrid/mail": "^6.3.1",
The text was updated successfully, but these errors were encountered: