Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aimenux/exceptionhandlingmiddlewaredemo
Using exception middleware to global handle errors
https://github.com/aimenux/exceptionhandlingmiddlewaredemo
exception-handling global-error-handling middleware net80 webapi
Last synced: about 2 months ago
JSON representation
Using exception middleware to global handle errors
- Host: GitHub
- URL: https://github.com/aimenux/exceptionhandlingmiddlewaredemo
- Owner: aimenux
- License: mit
- Created: 2022-03-02T00:14:19.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-05T11:08:54.000Z (7 months ago)
- Last Synced: 2024-06-06T00:10:07.612Z (7 months ago)
- Topics: exception-handling, global-error-handling, middleware, net80, webapi
- Language: C#
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![.NET](https://github.com/aimenux/ExceptionHandlingMiddlewareDemo/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/aimenux/ExceptionHandlingMiddlewareDemo/actions/workflows/ci.yml)
# ExceptionHandlingMiddlewareDemo
```
Using exception middleware to global handle errors
```In this demo, i m using an exception middleware in order to handle errors in the whole application.
Exceptions are thrown by :
>
- Infrastructure : see `Proxy` (which simulate an external instable web service)
>
- Domain : see `CompanyService` (which simulate some dummy eligibility rules)Exceptions are catched by the exception middleware and formatted using [problem details specification](https://datatracker.ietf.org/doc/html/rfc7807)
**`Tools`** : net 8.0, xunit