sendgrid-python icon indicating copy to clipboard operation
sendgrid-python copied to clipboard

HTTP Error 500: Internal server error - sendgrid (6.1.0)

Open stianpr opened this issue 6 years ago • 10 comments

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

  1. 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

stianpr avatar Nov 12 '19 09:11 stianpr

Anyone that can look at this?

stianpr avatar Jan 09 '20 14:01 stianpr

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.

stianpr avatar Jan 17 '20 13:01 stianpr

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

thinkingserious avatar Mar 17 '20 20:03 thinkingserious

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

thinkingserious avatar Mar 17 '20 21:03 thinkingserious

I seem to be getting the same error when I deployed to a server. However, it works on localhost

Sparlix avatar Jun 24 '20 16:06 Sparlix

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.

ShirinShirinak avatar Jul 28 '20 05:07 ShirinShirinak

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

ShirinShirinak avatar Jul 28 '20 05:07 ShirinShirinak

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?

asteinlein avatar Jan 14 '22 09:01 asteinlein

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 avatar Apr 13 '22 14:04 chrisvandyk

@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.

asteinlein avatar Apr 13 '22 15:04 asteinlein