Skip to content

Conversation

@melcher
Copy link

@melcher melcher commented Dec 22, 2016

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.

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

Now they return nil.
@melcher melcher force-pushed the not_found_exception branch from 966d46a to 309e46d Compare December 22, 2016 03:00
@adamof
Copy link
Collaborator

adamof commented May 8, 2017

Hey @melcher I just realised I did the same thing you did a while ago in #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
Copy link
Collaborator

adamof commented May 14, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants