Skip to content

abergs/OwinFriendlyExceptions.Plugins

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OwinFriendlyExceptions.Plugins

See Owin Frienly Exceptions for the owin middleware. This repository contains different framework plugins.

Web Api 2 plugin

Installation:

Install-package OwinFriendlyExceptions.Plugins.WebApi2

  1. Install-package OwinFriendlyExceptions.Plugins.WebApi2
  2. app.UseFriendlyExceptions(exceptionsToHandle, new [] {new WebApi2ExceptionProvider()});
  3. config.Services.Replace(typeof(IExceptionHandler), new WebApi2ExceptionHandler(exceptionsToHandle)); Install the package, and supply the WebApi Exception Provider to the OwinFriendlyExceptions extension method. In order for the Plugin to get swallowed exceptions you have to replace the ExcepionHandler service in Web Api. The plugin takes a list of which exceptions we can handle (that same collection fed to the middleware itself), so WebApi can still take care of unhandled exceptions for you.

Troubleshooting

When installing the Web Api Plugin, sometimes your System.Web.Http reference will mismatch. Use this Package Manager Console command to fix your Assembly Bining redirect: Get-Project YourProjectReferencingOwinFriendlyExceptions | Add-BindingRedirect

Contribute

Contributions are welcome. Just open an Issue or submit a PR.

Contact

You can reach me at @bigCheeseAnders or via my blog: ideasof.andersaberg.com

About

Framework plugins for OwinFriendlyExceptions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages