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

Configure what counts as a failure? #3

Open
laptobbe opened this issue Jan 23, 2015 · 2 comments
Open

Configure what counts as a failure? #3

laptobbe opened this issue Jan 23, 2015 · 2 comments
Labels

Comments

@laptobbe
Copy link
Owner

Should the user be able to configure what counts as a failure, a request that can be retried and a successful request? And how should this be specified? Just http status codes, specific errors from Apples NSURLErrorDomain?

@laptobbe
Copy link
Owner Author

One way is to have a delegate that gets the NSError from the request and then the delegate can choose to keep the request in the queue to retry or remove it to continue with the next one. For example:

- (BOOL)shouldRetryRequest:(NSURLRequest *)request afterError:(NSError *)error {

}

@laptobbe
Copy link
Owner Author

laptobbe commented Feb 2, 2015

We can let the user specify this on a per model class basis or we can let them configure it generally. Depends on the needs. Maybe it is nicer to handle it in each class. Then you can handle any specific errors there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant