-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Closed
Labels
Milestone
Description
“The ApiController attribute makes model validation errors automatically trigger an HTTP 400 response.”
It is not described, does details of 400 errors logged or not?
If not, is it possible to configure error details to be logged?
Or I have to SuppressModelStateInvalidFilter = true; and do logging by myself in the block
if (!ModelState.IsValid)
{
Log (ModelState);
return BadRequest(ModelState);
}
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: b391017f-25e1-d5e1-c4f7-020408ade7b5
- Version Independent ID: 263a7b64-2e42-bbfc-c1d3-61680438e1e4
- Content: Create web APIs with ASP.NET Core
- Content Source: aspnetcore/web-api/index.md
- Product: aspnet-core
- Technology: aspnetcore-webapi
- GitHub Login: @scottaddie
- Microsoft Alias: scaddie
mausch, mogaozq, WinThuGithub, AKlaus, Kraego and 1 more