你的位置: 码友网首页 / 资讯源列表 / Global Exception Handling in ASP.NET Core Web API

关于[Global Exception Handling in ASP.NET Core Web API]的摘要:

A good web API is consistent and follows established patterns for communicating error states to the client, leveraging the appropriate HTTP status codes. To that end, a global exception handler can be very helpful in consolidating a service’s error handling logic in one place and translating errors into the appropriate responses to send back to the client. In this post I’ll show you how you can plug custom exception-handling logic into the ASP.NET Core request pipeline to handle any exceptions that are thrown in your API.

原文地址: https://blog.jonblankenship.com/2020/04/12/global-exception-handling-in-aspnet-core-api/

收录时间: 2020-04-23 浏览量: 1383 分类: ASP.NET Core

| 0 收藏 | 0