You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was migrating from v2 to v3 and came across that when an email with custom arguments has non-string properties, the email doesn't send and the response is an unhelpful 400.
Steps to Reproduce
I tried adding a custom_args property to an email I was sending that looked like this:
custom_args: {
user_id: 1234
}
The response I got back: 400 Bad Request and JSON was
Needless to say, this was very unhelpful. And, given that I had a bunch of other properties on my email, I had to debug them 1 by 1 to find out what it was that was doing this.
The SendGrid API needs to send back more helpful information in this case. Perhaps this package could cast everything to a string in the custom_args property?
Technical details:
sendgrid-nodejs Version: 4.0.2
Node.js Version: 4.2.6
The text was updated successfully, but these errors were encountered:
This issue is already on our backlog to be fixed at the API level (providing a better error response).
We are currently in the planning phases for improvements to the Mail Helper and your suggestion has been added.
In appreciation for you taking the time to provide detailed feedback, we'd like to send you a T-shirt. Could you email us at dx@sendgrid.com with your mailing address and T-shirt size?
Thanks for the heads up @enricribas, hours spent on this is not acceptable. When you get a moment, I would appreciate an upvote to issue #658 to give it higher priority in our backlog.
Issue Summary
I was migrating from v2 to v3 and came across that when an email with custom arguments has non-string properties, the email doesn't send and the response is an unhelpful 400.
Steps to Reproduce
I tried adding a
custom_args
property to an email I was sending that looked like this:The response I got back: 400 Bad Request and JSON was
Needless to say, this was very unhelpful. And, given that I had a bunch of other properties on my email, I had to debug them 1 by 1 to find out what it was that was doing this.
The SendGrid API needs to send back more helpful information in this case. Perhaps this package could cast everything to a string in the
custom_args
property?Technical details:
The text was updated successfully, but these errors were encountered: