I am working on an iOS which connects to a RESTFUL Web Service for consuming data. I am handling the error scenarios in connection: didFailWithError:
delegate method.
Recently I came to know that, I need to handle few errors in connection: didReceiveResponse:
delegate method also. Because, errors like 500 internal error and 400, 404 gets notified in connection: didReceiveResponse:
.
But, one concern is I don't know how to test these scenarios. How do I reproduce the 500 or 400 specific errors? Any suggestion on this will help me a lot!!
Please correct me if my understanding is wrong.