Category Archives: Exception Handling

Exception Handling in ASP.NET Web API – Part 2

In order to return HTTP Response with a specific error status code, normally HttpResponseException type is used. In part-1 of this ASP.NET Web API Tutorial, we checked a specific condition and return error status code accordingly. What exactly we did? We checked if student object returned from a data source is null, then throw HttpResponseException with HTTP… Read More »