AspNetCore.Docs
AspNetCore.Docs copied to clipboard
Suggestion: Include a simple example of how to set up ProblemDetails to include/exclude the exception details.
👋🏻 G'day - would be really helpful/nice to include some sample code to include/exclude any exception information if the environment is not IsDevelopment().
if it IsDevelopment() then we can see the extra exception information. This is different to error information for 400 bad requests, etc. which I would have thought, should always be shown/displayed.
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
- ID: 3f6504cd-a059-c5d4-73fb-61222ef1c6e0
- Version Independent ID: 1b42352c-a34f-7703-aa3e-d7e3156bd0bd
- Content: Handle errors in ASP.NET Core web APIs
- Content Source: aspnetcore/web-api/handle-errors.md
- Product: aspnet-core
- Technology: aspnetcore-webapi
- GitHub Login: @tdykstra
- Microsoft Alias: riande