如何在 ASP.net Web Api 中引发异常?
下面是我的代码:
public Test GetTestId(string id)
{
    Test test = _test.GetTest(id);
    if (test == null)
    {
        throw new HttpResponseException(HttpStatusCode.NotFound);
    }
    return test;
}
我认为我做的不对,我的客户怎么知道这是一个HTTP 404错误?