René's URL Explorer Experiment


Title: Getting HTTP 400 Bad request but email is getting delivered from sendgrid. · Issue #866 · sendgrid/sendgrid-python · GitHub

Open Graph Title: Getting HTTP 400 Bad request but email is getting delivered from sendgrid. · Issue #866 · sendgrid/sendgrid-python

X Title: Getting HTTP 400 Bad request but email is getting delivered from sendgrid. · Issue #866 · sendgrid/sendgrid-python

Description: Issue Summary I am getting a HTTP 400 Bad request response when calling sendgrid email, BUT THE EMAIL IS GETTING SENT OUT. I expect if error is getting returned then the email should not be delivered. Steps to Reproduce run snippet below...

Open Graph Description: Issue Summary I am getting a HTTP 400 Bad request response when calling sendgrid email, BUT THE EMAIL IS GETTING SENT OUT. I expect if error is getting returned then the email should not be deliver...

X Description: Issue Summary I am getting a HTTP 400 Bad request response when calling sendgrid email, BUT THE EMAIL IS GETTING SENT OUT. I expect if error is getting returned then the email should not be deliver...

Mail addresses
no-reply@securityadvisor.io
rohan@securityadvisorbot.com
rohan@securityadvisor.io
rohan@securityadvisor.io

Opengraph URL: https://github.com/sendgrid/sendgrid-python/issues/866

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Getting HTTP 400 Bad request but email is getting delivered from sendgrid.","articleBody":"\r\n### Issue Summary\r\nI am getting a HTTP 400 Bad request response when calling sendgrid email, BUT THE EMAIL IS GETTING SENT OUT. I expect if error is getting returned then the email should not be delivered.\r\n\r\n### Steps to Reproduce\r\n1. run snippet below.\r\n\r\n### Code Snippet\r\nsg = sendgrid.SendGridAPIClient(settings.SENDGRID_API_KEY)\r\n        template_data = Content(\"text/html\", template)\r\n        to_email = Email(to_email)\r\n        mail = Mail(from_email, subject, to_email, template_data)\r\n        response = sg.client.mail.send.post(request_body=mail.get())\r\n\r\nHere is the output of mail.get()\r\n{ \r\n   \"from\":{ \r\n      \"email\":\"no-reply@securityadvisor.io\"\r\n   },\r\n   \"subject\":\"Employees trainings are due on 2020-01-24\",\r\n   \"personalizations\":[ \r\n      { \r\n         \"to\":[ \r\n            { \r\n               \"email\":\"\"\r\n            }\r\n         ]\r\n      }\r\n   ],\r\n   \"content\":[ \r\n      { \r\n         \"type\":\"text/html\",\r\n         \"value\":\"\u003c!DOCTYPE html\\n  PUBLIC \\\"-//W3C//DTD XHTML 1.0 Transitional//EN\\\" \\\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\\\">\\n\u003chtml xmlns=\\\"http://www.w3.org/1999/xhtml\\\">\\n\\n\u003chead>\\n  \u003cmeta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=utf-8\\\" />\\n  \u003cmeta name=\\\"viewport\\\" content=\\\"width=device-width, initial-scale=1\\\">\\n  \u003ctitle>SecurityAdvisor\u003c/title>\\n  \u003cstyle type=\\\"text/css\\\">\\n    table,\\n    td {\\n      mso-table-lspace: 0;\\n      mso-table-rspace: 0 !important\\n    }\\n\\n    span.preheader {\\n      display: none !important;\\n    }\\n\\n    @media only screen and (max-width: 768px) {\\n      table[class=contentTableOuter] {\\n        width: 95%\\n      }\\n\\n      table[class=contentTableInner] {\\n        width: 95%;\\n        margin: 0 auto\\n      }\\n\\n      table[class=fLeft],\\n      table[class=fRight] {\\n        width: 100%;\\n        margin-bottom: 10px;\\n        border: none\\n      }\\n\\n      table[class=fLeft] td,\\n      table[class=fRight] td {\\n        height: auto;\\n        border: none;\\n        text-align: center\\n      }\\n\\n      img[class=resImg] {\\n        width: 100% !important;\\n        height: auto !important\\n      }\\n\\n      .d-none {\\n        display: none\\n      }\\n    }\\n\\n  \u003c/style>\\n\u003c/head>\\n\\n\u003cbody>\\n\u003ctable width=\\\"100%\\\" border=\\\"0\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\" bgcolor=\\\"#ececec\\\">\\n  \u003ctr>\\n    \u003ctd align=\\\"center\\\" valign=\\\"top\\\" bgcolor=\\\"#ececec\\\" height=\\\"20\\\"> \u003c/td>\\n  \u003c/tr>\\n  \u003ctr>\\n    \u003ctd align=\\\"center\\\" valign=\\\"top\\\" bgcolor=\\\"#ececec\\\">\\n\\n      \u003ctable width=\\\"700\\\" border=\\\"0\\\" align=\\\"center\\\" cellpadding=\\\"10\\\" cellspacing=\\\"0\\\" class=\\\"contentTableOuter\\\">\\n        \u003ctr>\\n          \u003ctd align=\\\"center\\\" valign=\\\"top\\\" bgcolor=\\\"#FFFFFF\\\">\\n            \u003ctable width=\\\"600\\\" border=\\\"0\\\" align=\\\"center\\\" cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" class=\\\"contentTableInner\\\">\\n              \u003ctr>\\n                \u003ctd align=\\\"left\\\" valign=\\\"top\\\">\\n                  \u003ctable width=\\\"100%\\\" border=\\\"0\\\" align=\\\"left\\\" cellpadding=\\\"20\\\" cellspacing=\\\"0\\\" class=\\\"fLeft\\\">\\n                    \u003ctr>\\n                      \u003ctd align=\\\"center\\\" valign=\\\"middle\\\">\\n                        \u003ca href=\\\"https://www.securityadvisor.io/\\\" target=\\\"_blank\\\">\\n                          \u003cimg src=\\\"https://logouploadtest.s3.amazonaws.com/OrganisationLogo/305cd33aa1cc49ba945eb86844e1683c\\\" alt=\\\"\\\" width=\\\"300\\\" border=\\\"0\\\" />\u003c/a>\u003c/td>\\n                    \u003c/tr>\\n                  \u003c/table>\\n                \u003c/td>\\n              \u003c/tr>\\n              \u003ctr>\\n                \u003ctd align=\\\"left\\\" valign=\\\"top\\\">\\n                  \u003chr width=\\\"100%\\\" size=\\\"1\\\" noshade=\\\"noshade\\\" style=\\\"border:1px solid #f1f1f2\\\">\\n                \u003c/td>\\n              \u003c/tr>\\n              \u003ctr>\\n                \u003ctd height=\\\"20\\\" align=\\\"left\\\" valign=\\\"top\\\"> \u003c/td>\\n              \u003c/tr>\\n              \u003ctr contenteditable=\\\"true\\\">\\n                \u003ctd style=\\\"padding: 15px;\\\">\\n                  \u003cp style=\\\"font-size: 15px;\\\">Hello \u003cb>Manager\u003c/b>\u003c/p>\u003cbr>\\n                  \u003cp>This is a reminder. The following trainings are due to be completed by the users by January 24, 2020\u003cp>\u003c/p>\\n                  \u003cul>\\n                    \\n                      \u003cli>\\n                        \u003cp>California Consumer Privacy Act : \u003ca href=\\\"https://localhost:8001/gw/c2c7f4bd55754f068fff5a13f4d1d243/\\\"> Click here to start \u003c/a> \u003c/p>\\n                      \u003c/li>\\n                    \\n                  \u003c/ul>\\n                  \u003cbr>\\n                  \u003cp> Users List\u003c/p>\\n                  \u003cul>\\n                    \\n                      \u003cli>\\n                        \u003cp>Yahoo Yahoo last name - rohan@securityadvisorbot.com\u003c/p>\\n                      \u003c/li>\\n                    \\n                      \u003cli>\\n                        \u003cp>rohan@securityadvisor.io - rohan@securityadvisor.io\u003c/p>\\n                      \u003c/li>\\n                    \\n                  \u003c/ul>\\n\\n                  \u003cp>Regards,\u003c/p>\\n                  \u003cp>Your Information Security Team\u003c/p>\\n                  \u003c/p>\\n                \u003c/td>\\n              \u003c/tr>\\n            \u003c/table>\\n          \u003c/td>\\n        \u003c/tr>\\n\\n        \u003ctr>\\n          \u003ctd align=\\\"right\\\" valign=\\\"top\\\" bgcolor=\\\"#666666\\\"\\n              style=\\\"font-size: 13px; font-family:Arial, Helvetica, sans-serif; color:#ffffff\\\">\\n\\n            Powered by SecurityAdvisor\\n            \u003ca href=\\\"https://www.securityadvisor.io\\\" target=\\\"_blank\\\" style=\\\"color:#fff; text-decoration: none\\\">\\n              \u003cimg src=\\\"https://content.securityadvisor.io/static/assets/images/securityadvisor-logo-footer.png\\\"\\n                   align=\\\"center\\\" width=\\\"120\\\" alt=\\\"SecurityAdvisor\\\" border=\\\"0\\\" class=\\\"\\\" style=\\\"padding-left:10px\\\" />\u003c/a>\\n          \u003c/td>\\n        \u003c/tr>\\n\\n        \u003ctr>\\n          \u003ctd align=\\\"center\\\" valign=\\\"top\\\" bgcolor=\\\"#ececec\\\"\\n              style=\\\"font-size: 12px; font-family:Arial, Helvetica, sans-serif; color:#666\\\">\\n            You received this email because your organization is registered with SecurityAdvisor. Please contact your\\n            administrator to unsubscribe.\\n            \u003cbr> \u003cbr>\\n            We respect your privacy. View our \u003ca href=\\\"https://www.securityadvisor.io/sabweb/privacy\\\" target=\\\"_blank\\\"\\n                                                 style=\\\"color:#666\\\">Privacy Policy\u003c/a>.\\n          \u003c/td>\\n        \u003c/tr>\\n\\n      \u003c/table>\\n    \u003c/td>\\n  \u003c/tr>\\n\\n  \u003ctr>\\n    \u003ctd align=\\\"center\\\" valign=\\\"top\\\" bgcolor=\\\"#ececec\\\" height=\\\"20\\\"> \u003c/td>\\n  \u003c/tr>\\n\u003c/table>\\n\u003c/body>\\n\\n\u003c/html>\\n\"\r\n      }\r\n   ]\r\n}\r\n\r\n### Exception/Log\r\nHTTP Error 400: Bad Request\r\n\r\n### Technical details:\r\n* sendgrid-python version:5.6.0\r\n* python version:3.7.4\r\n\r\n","author":{"url":"https://github.com/r-puri","@type":"Person","name":"r-puri"},"datePublished":"2020-01-23T18:48:59Z","url":"https://github.com/sendgrid/sendgrid-python/issues/866"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:e52e70f0-576a-814a-006d-cdc803985d9a
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC170:11EACE:2A13B5C:3838CD1:6B01BE53
html-safe-noncec4368ca5c36b2fbad634ebe46a1e20516eef731705d9f765d94a21e3f842c3c2
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMTcwOjExRUFDRToyQTEzQjVDOjM4MzhDRDE6NkIwMUJFNTMiLCJ2aXNpdG9yX2lkIjoiNTE5NTIyNTY2NDYwODkxMDkzMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac98663ea6cff1f40b22b9da6ff01a495d628d71dd084726e8fea722984812e1fb
hovercard-subject-tagissue:554338345
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/sendgrid/sendgrid-python/866/issue_layout
twitter:imagehttps://opengraph.githubassets.com/a75a373681da24168006eb58f9fddaaf43de9f792990e7d289c4614d21581519/sendgrid/sendgrid-python/issues/866
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/a75a373681da24168006eb58f9fddaaf43de9f792990e7d289c4614d21581519/sendgrid/sendgrid-python/issues/866
og:image:altIssue Summary I am getting a HTTP 400 Bad request response when calling sendgrid email, BUT THE EMAIL IS GETTING SENT OUT. I expect if error is getting returned then the email should not be deliver...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamer-puri
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/sendgrid/sendgrid-python git https://github.com/sendgrid/sendgrid-python.git
octolytics-dimension-user_id181234
octolytics-dimension-user_loginsendgrid
octolytics-dimension-repository_id3546794
octolytics-dimension-repository_nwosendgrid/sendgrid-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id3546794
octolytics-dimension-repository_network_root_nwosendgrid/sendgrid-python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/sendgrid/sendgrid-python/issues/866#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsendgrid%2Fsendgrid-python%2Fissues%2F866
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsendgrid%2Fsendgrid-python%2Fissues%2F866
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=sendgrid%2Fsendgrid-python
Reloadhttps://github.com/sendgrid/sendgrid-python/issues/866
Reloadhttps://github.com/sendgrid/sendgrid-python/issues/866
Reloadhttps://github.com/sendgrid/sendgrid-python/issues/866
sendgridhttps://github.com/sendgrid
sendgrid-pythonhttps://github.com/sendgrid/sendgrid-python
Codehttps://github.com/sendgrid/sendgrid-python
Issues50 (50)https://github.com/sendgrid/sendgrid-python/issues
Pull requests17 (17)https://github.com/sendgrid/sendgrid-python/pulls
Actionshttps://github.com/sendgrid/sendgrid-python/actions
Security and qualityhttps://github.com/sendgrid/sendgrid-python/security
Insightshttps://github.com/sendgrid/sendgrid-python/insights
https://github.com/sendgrid/sendgrid-python
New issuehttps://github.com/login?return_to=https://github.com/sendgrid/sendgrid-python/issues/866
New issuehttps://github.com/login?return_to=https://github.com/sendgrid/sendgrid-python/issues/866
Getting HTTP 400 Bad request but email is getting delivered from sendgrid.https://github.com/sendgrid/sendgrid-python/issues/866#top
https://github.com/r-puri
r-purihttps://github.com/r-puri
on Jan 23, 2020https://github.com/sendgrid/sendgrid-python/issues/866#issue-554338345
@mediahttps://github.com/media
#666https://github.com/sendgrid/sendgrid-python/pull/666
#666https://github.com/sendgrid/sendgrid-python/pull/666
r-purihttps://github.com/r-puri
completedhttps://github.com/sendgrid/sendgrid-python/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Jan 23, 2020https://github.com/sendgrid/sendgrid-python/issues/866#event-2974920332
Sign up for freehttps://github.com/signup?return_to=https://github.com/sendgrid/sendgrid-python/issues/866
Sign in to commenthttps://github.com/login?return_to=https://github.com/sendgrid/sendgrid-python/issues/866
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.