title: ASP.NET MVC, throw HttpException vs return HttpStatusCodeResult?
body: <p>I am developing a RESTful service and I want to return 400 for all unsupported URLs.</p>
  
  <p>My question is <strong>when should I choose method 1 over method 2 and vice-versa..</strong></p>
  
  <pre><code>//method 1
  public ActionResult Index()
  {
      //The url is unsupported
      throw new HttpException(400, "Bad Request");
  }
  </code></pre>
  
  <p>This one seems to be better?</p>
  
  <pre><code>//method 2
  public ActionResult Index()
  {
      //The url is unsupported
      return new HttpStatusCodeResult(HttpStatusCode.BadRequest, "Bad Request");
  }
  </code></pre>