Closed RuiAAPeres closed 9 years ago
:-1: It's up to your consumer of DVR to know if it failed or not. This is supposed to just be a mirror of NSURLSession. Since NSURLSession says success if the request worked (even if it's an "error" response code), DVR should do the same.
Also, not a fan of all of the added whitespace :)
As a consumer, I would expect that if a cassete as a 404, then an error will come from NSURLSession
.
Bottom line: DVR should be indistinguishable from NSURLSession to the consumer. That's DVR's whole purpose.
Sam
On Sun, Aug 9, 2015 at 3:55 PM, Rui Peres notifications@github.com wrote:
As a consumer, I would expect that if a cassete as a 404, then an error will come from
NSURLSession
.Reply to this email directly or view it on GitHub: https://github.com/venmo/DVR/pull/17#issuecomment-129258933
Since NSURLSession says success if the request worked (even if it's an "error" response code), DVR should do the same.
Agreed. DVR shouldn't be making assumptions about what constitutes an error between a client and server.
:+1:
If the status code is outside that range, an error will be passed instead. (otherwise it seems it's always a success)