Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise error if batch command partially failed #64

Closed
BRMatt opened this issue Oct 11, 2013 · 1 comment
Closed

Raise error if batch command partially failed #64

BRMatt opened this issue Oct 11, 2013 · 1 comment

Comments

@BRMatt
Copy link

BRMatt commented Oct 11, 2013

Operations such as lists.batch_subscribe return errors in an errors array, rather than a single error value that the response handler expects. At the moment if an error occurs during that operation gibbon silently returns.

As we can't raise individual errors for each error in the array we have two choices:

  1. Raise a Gibbon::MailChimpError for the first error in the array
  2. Introduce a new Gibbon::MultipleMailChimpErrors to encapsulate all of the errors

Thoughts?

@amro
Copy link
Owner

amro commented Oct 11, 2013

The trouble with raising an error in batch cases is the caller wouldn't have the information to handle the successful portion of the response. This makes building apps that sync lists with MailChimp tough. And I don't believe the successful portion of the response belongs in the error.

Would raising an error if all of the batched items fail be helpful?

@amro amro closed this as completed Oct 18, 2013
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

No branches or pull requests

2 participants