mnailgun icon indicating copy to clipboard operation
mnailgun copied to clipboard

Poor handling of timeouts when trying to send messages with large attachments

Open astiskala opened this issue 8 years ago • 0 comments

Hi There,

I have been seeing timeouts in some cases when a message has many attachments. The timeouts surface themselves as a NullReferenceException as such:

System.NullReferenceException: Object reference not set to an instance of an object. at Typesafe.Mailgun.Http.MailgunHttpResponse.ReadJson() at Typesafe.Mailgun.Http.MailgunHttpRequest.GetResponse() at Typesafe.Mailgun.MailgunCommand1.Invoke()`

I believe it would be best if the library threw either a standard web exception or something more explicit in these cases.

It would also be good to be able to set a custom timeout value on the MailgunClient to override the default.

I'd be happy to put together a PR for this if you're accepting changes.

  • Adam

astiskala avatar Feb 04 '18 22:02 astiskala