Provides extension methods to configure services and middleware related to exception handling in your ASP.NET Core application.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/FloppyShelf/Problemize/llms.txt
Use this file to discover all available pages before exploring further.
Namespace
UseExceptionHandling (services)
Configures the required services including problem details and exception handling.Parameters
The service collection to configure.
Optional custom status code mapper. If not provided, the default
StatusCodeMapper will be used.Behavior
This method:- Configures problem details with automatic metadata (instance, requestId, activityId)
- Registers the status code mapper as a singleton (custom or default)
- Registers the
ExceptionHandlerservice
Exceptions
- ArgumentNullException: Thrown when
servicesis null
Example
UseExceptionHandling (app)
Configures the middleware pipeline to use exception handling and status code pages.Parameters
The web application instance.
Behavior
This method:- Enables global exception handling middleware
- Provides status code responses (e.g., 404 Not Found)
Exceptions
- ArgumentNullException: Thrown when
appis null