Skip to content

Instantly share code, notes, and snippets.

@dcomartin
Created June 21, 2018 01:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dcomartin/47086ebbf83682c691e2cb00b51647e1 to your computer and use it in GitHub Desktop.
Save dcomartin/47086ebbf83682c691e2cb00b51647e1 to your computer and use it in GitHub Desktop.
public override void Configure(IApplicationBuilder app)
{
app.UseProblemDetails(x =>
{
// This will map NotImplementedException to the 501 Not Implemented status code.
x.Map<NotImplementedException>(ex => new ExceptionProblemDetails(ex, StatusCodes.Status501NotImplemented));
});
app.UseMvc();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment