This PR stops relying on NSURLSession.error and relies on the status code to
figure whether a request failed or not. The reason is because in my app,
.error is nil even when status code is 400. That was preventing
.onFailure to ever be triggered.
Running the tests after the change, nothing broke, so I suppose everything's
fine. Plus, my app is now working :D
This PR stops relying on NSURLSession.error and relies on the status code to figure whether a request failed or not. The reason is because in my app,
.error
isnil
even when status code is400
. That was preventing.onFailure
to ever be triggered.Running the tests after the change, nothing broke, so I suppose everything's fine. Plus, my app is now working :D