mailgun icon indicating copy to clipboard operation
mailgun copied to clipboard

Fixes "TypeError" for all http 404 responses

Open melcher opened this issue 9 years ago • 2 comments

Prior to this PR, any 404 response from mailgun would cause a TypeError: exception class/object expected to be thrown from the mailgun gem.

The previous behavior is that 404 should return a nil response instead of throwing an exception. This re-introduces that behavior (with specs), so that only errors that respond to the 'handle' method will be re-raised.

melcher avatar Dec 22 '16 02:12 melcher

Hey @melcher I just realised I did the same thing you did a while ago in https://github.com/HashNuke/mailgun/pull/58 I can see from this PR that you think the expected behaviour when fetching a missing object is to return nil, how did you decide on that?

Cheers, Stefan

adamof avatar May 08 '17 12:05 adamof

@hairihan do you have any opinion on the topic? :)

adamof avatar May 14 '17 12:05 adamof