Consume Web API web services

The HttpClient class you have implemented frequently receives error codes, but the application is not responding to them. What should you do?

Check the ResultStatusCode property and throw an exception if one of the error values is present.
Call the EnsureSuccessStatusCode method and trap the HttpRequestException exception.
Trap the OnError event of the request.
Set the EnsureSuccessStatusCode property to true and implement an exception handler in the OnError event.