title: How to set ASP.NET Web Api Route Constraint HTTP Status Return Code
body: <p>I am using ASP.NET Web Api 2 framework and using a basic route constraint as below.</p>
  
  <pre><code>    [Route("Number/{id:int:min(2):max(10)}")]
      public HttpResponseMessage GetNumber([FromUri] int id)
      {
          return (id &gt; 0)
              ? Request.CreateResponse(HttpStatusCode.OK, id)
              : Request.CreateResponse(HttpStatusCode.PreconditionFailed);
      }
  </code></pre>
  
  <p>I would like to know when the id is conflict with the constraint above, .e.g. 1 or 11,
  how can I overrride the default HTTP Status Return code which is 404?</p>
  
  <p>Thanks very much.</p>