tictail/greplin-tornado-sendgrid — pull request #2 by martinmelin (2013-10-21 08:48:58+00:00)
Title: Handle timeouts from SendGrid

Getting a HTTPError(599) as a result here used to cause a TypeError to be thrown from inside tornado.escape, since result.body would be None.

Now we handle this and other responses with an empty body as the HTTP errors they are.