mailgun/mailgun-php — pull request #48 by nathanntg (2014-06-16 14:53:47+00:00)
Title: More detailed generic HTTP errors

With recent issues delivering larger messages, my implementation of the Mailgun SDK has been throwing GenericHTTP exceptions as their is no specific Exception for the 554 internal errors being thrown by the Mailgun server.

I don't necessarily think that all response codes warrant their own Exception type (although maybe some internal errors do). But in the mean time, it would be nice if the Generic HTTP error exposed more detail about the underlying response. It would allow more detailed logging and debugging.

This simple implementation should allow that.