-
Notifications
You must be signed in to change notification settings - Fork 714
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
400 Error Bad Request Dynamic Templates with Substitutions not working #907
Comments
It looks like this issue may have been fixed in #908. You can check by installing this library locally, or wait until the fix is rolled out in the next release on 2020-06-24 |
I don't think that will help. Best to log the error body response to see a more detailed reason for the failure. Example here: https://github.com/sendgrid/sendgrid-python/blob/master/use_cases/error_handling.md |
I did that and here is the response
@eshanholtz I tried the #908 fix, but it still throws up error, not sure what I am doing wrong. I got another exception for this :
Will the fix for this specific issue (substitution support for dynamic templates) be released on 2020-06-24? |
The fix will be to switch from using |
Issue Summary
I am trying to send multiple emails using a Dynamic Template, with each email having their own unique substitutions using the Mail Helper class. If I don't include the substitutions then the code works perfectly and mails are delivered, but as soon as I include substitution I get a "HTTP Error 400: Bad Request".
I am using Virtual Environment and running it in my Flask app.
I have installed sendgrid using "pip install sendgrid" and its updated to the latest version.
Code Snippet
Exception/Log
Technical details:
I tried upgrading and this is what it prints
The text was updated successfully, but these errors were encountered: