zendesk/zendesk_api_client_rb — pull request #84 by steved555 (2013-03-26 03:56:58+00:00)
Title: error handling refactor - wip

@3en @benilovj

Since I've heard mostly complaints about the current error handling, I've begun to try to refactor it for a 1.0-type release. I'll be working on this branch for the next couple days to try and make it more consistent / cleaner, but may merge it within the week. I'm hoping this will solve most of your error-handling issues, but I'd love your feedback.

Notably:
#71, #76

Becomes:
```ruby
begin
subject.each_page! { .... } # Note the "!"
rescue ZendeskAPI::Error::NetworkError
retry
rescue ZendeskAPI::Error::ClientError
end
```

Which will only retry on Network errors (400..600, not including 422) and always start from the correct page.

#72