Skip to content

v2.0 #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Jul 16, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update readme
  • Loading branch information
Ihar Yakimush authored and Ihar Yakimush committed Jul 16, 2018
commit 3115bb2c8005a55a249e5b7d367d7c0cdcc1e2c1
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env)
app.UseMvc();
}
```
### Policy handlers transitions

### Policy exception handler transitions
When exception catched in middleware it try to apply handlers from first registered policy siutable for given exception. Policy contains a chain of handlers. Each handler perform some action and apply transition. To prevent re throw of exception handlers chain MUST ends with "Handled" transition.
Following handlers currently supported:

Expand All @@ -53,4 +54,12 @@ Following handlers currently supported:
| DisableFurtherLog | Prevent exception from being logged again in current middleware (for current request only) | NextHandler |
| Response | Modify response (set status code, headers and body) depending on further response builder configuration | NextHandler |

Sample of transitions:
![alt text](/Transitions.png)

### Nuget
| Package | Target | Comments |
| ---------| ------------- | ------------- |
| https://www.nuget.org/packages/Commmunity.AspNetCore.ExceptionHandling | netstandard2.0;netcoreapp2.1 | Main functionality |
| https://www.nuget.org/packages/Commmunity.AspNetCore.ExceptionHandling.Mvc | netcoreapp2.1 | Alllow to use MVC IActionResult (including ObjectResult) in 'Response' handler |
| https://www.nuget.org/packages/Commmunity.AspNetCore.ExceptionHandling.NewtonsoftJson | netstandard2.0; | Allow to set Json serialized object as a response body in 'Response' handler. Use it only if 'Commmunity.AspNetCore.ExceptionHandling.Mvc' usage not possible |