-
Notifications
You must be signed in to change notification settings - Fork 583
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
Adding HTML Content Before Plain Text Content Results In Bad Request Response #352
Comments
Thanks for the heads up @brendonwm! |
I'd like to ask that the error message also be changed to indicate that there can't be multiple text/plain and text/html Content items. The current error implies you can have multiple Contents of each type, but they must be grouped separately. In reality, only >>one<< instance of each type is allowed, and the "plain" one must come before the "html" one. I can't tell you how many hours I've wasted re-learning this (I don't use SendGrid often enough to keep it "top of mind"). Personally, it'd make more sense to keep separate individual properties of "text/plain" and "text/html" content, and then merge them together, in the proper sequence, someplace in the bowels of the library. |
Thank you for the detailed feedback @markolbert! Great suggestion, we should be able to bake this into the v9 release. |
I just dealt with this I wish I found this error before having to find the solution on my own. haha. |
Glad you found the solution, but sad you had to go through that pain. Thanks for letting us know so we can upvote that issue on your behalf. |
This is no longer an issue in v9 of this SDK. Thanks! |
Issue Summary
I realize that a new branch is in progress to bring back static typing - raising in case this is an issue there as well.
Steps to Reproduce
Any other information you want to share that is relevant to the issue being reported. Especially, why do you consider this to be a bug? What do you expect to happen instead?
I would expect to be able to add text/plain and text/html content in any order.
Technical details:
The text was updated successfully, but these errors were encountered: