Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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