# Handling Global Exceptions in ASP.NET Core

AddProblemDetails and UseExceptionHandler catch every exception an action doesn't, log it, and answer with a tidy 500 problem details response that never shows the stack trace. An IExceptionHandler can answer chosen exceptions with a better status, such as 409 Conflict.

![Cheat sheet: Handling Global Exceptions in ASP.NET Core](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/3b7e4b24a8044722b077fc59e13a9ca9.webp)

- Category: ASP.NET Core
- Level: Freelancer
- Tags: aspnet-core, Exception Handling Middleware, IExceptionHandler, Problem Details in ASP.NET Core, rest-api
- Updated: November 3, 2026

Source: https://www.ask-codey.com/cheat-sheets/handling-global-exceptions-in-aspnet-core-cheat-sheet
