ASP.NET Web API: Non-descriptive 500 Internal Server Error

前端 未结 10 1236
难免孤独
难免孤独 2020-12-07 16:08

As title says, I’ve got 500 Internal Server Error from GET request to an IQueryable action. The body of the error is empty. That error happens after my action returns result

10条回答
  •  自闭症患者
    2020-12-07 16:44

    Fredrik Normén wrote a great blog post called ASP.NET Web API Exception Handling about that topic. His solution uses custom exception classes and an exception filter attribute that can be applied to all ApiController action methods.

提交回复
热议问题