rdohms / meetup-api-client

Guzzle powered Meetup.com API Client
MIT License
76 stars 24 forks source link

GetProfile - Member no longer exists #31

Closed interludic closed 8 years ago

interludic commented 8 years ago

Hi thanks for all your work its very helpful,

Notice that, when a user is no longer a member of the group, an exception is returned, however i need a softer non fatal error response. for now i will check if the user exists or not first, however i thought this would be handled this package?

ClientErrorResponseException in     /home/vagrant/api/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/BadResponseException.php line     43:
Client error response
[status code] 404
[reason phrase] Not Found
[url] http://api.meetup.com/2/profile/6760582/17352231?key=
rdohms commented 8 years ago

@HarryBosh i'll take a look at this, but its a 404 response, would be a bad practice to try and read this specific scenario to throw a custom exception.

Best we could do here is make a general 404 exception. However, i'm not sure I follow you when you say softer non-fatal, exceptions are not fatal, you can just wrap this in a try catch block and catch the bad response exception, can't you?

interludic commented 8 years ago

Your absolutely right, nothing further needs to be done.