HTTP Error 500: Internal server error - sendgrid (6.1.0)
Issue Summary
I'm trying to search for a whitelabel domain with a unicode character in it. This results in a 500 internal server error.
Steps to Reproduce
-
sg.client.whitelabel.domains.get(query_params={'domain': 'exåmple.no'})
This API query results in a python_http_client.exceptions.InternalServerError.
Technical details:
- sendgrid-python Version: 6.1.0
- Python Version: 3.4.8
Anyone that can look at this?
We're also getting sporadically 500 error codes on authentication of whitelabel domains. With and without special characters. SendGrid support states that the domain should be "as-is" and shouldn't need any IDNA encoding. Anyway we shouldn't receive internal server errors from the API. So we're just interested to know when this will be fixed.
Hello @stianpr,
Unfortunately, I don't have a timeline for a fix.
This issue has been added to our internal backlog to be prioritized. Pull requests and +1s on the issue summary will help it move up the backlog.
Thanks!
Elmer
Hello @stianpr,
I was able to reproduce the issue on v6.1.3. It looks like our API does not support encoding the å character in a domain name. Do you have an authenticated domain with that character included?
Thanks!
Elmer
I seem to be getting the same error when I deployed to a server. However, it works on localhost
I have noticed random 500 server errors as well! everything is the same (there is no change) but a 500 error happens every now and then. Its an error response from sendgrid:
{
message: 'getaddinfo ENOTFOUND api.sendgrid.com',
name: 'Error',
stack: 'Error: getaddrinfo ENOTFOUND api.sendgrid.com\n' +
' at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:64:26)'
}
I would say sending an email works majority of the time but it's a bit worrying that it can't be trusted 100%. When I received this 500 error, everything was exactly the same and then when I tried again, it worked this time. So it seems to be quite random.
I seem to be getting the same error when I deployed to a server. However, it works on localhost
I actually saw the error first on local host because I was testing a lot of things over and over again lol
Then someone else noticed the issue on the deployed server
This happens consistently for us with Norwegian characters in the domain name (æøå). Strange this isn't prioritized at all given how common this issue must be internationally?
I believe that the unicode characters is a red herring here. We're seeing similar issues with sporadic "internal server error"s and 100% ascii. In any case, an API should never return 500 for any reason and it's very concerning that Sendgrid is allowing these types of errors to bubble up to the API responses. Moreover, sending emails is Sendgrid's primary business model so you would think that a defect that prevents this from occurring would be their #1 priority.
@chrisvandyk I totally agree. I sent an email to their priority support now (we're a pretty high-volume Sendgrid customer) pinging them about this issue, so thanks for reminding me with your comment here today that nothing has in fact been done about this -- for over two years now.