Closed
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
Errors are not available in the response when returning with Results.ValidationProblem
.
app.MapPost("/test", () =>
{
return Results.ValidationProblem(new Dictionary<string, string[]> {
{ "testError", new string[] { "message" } }
});
});
Hitting the endpoint above I dont see the errors provided in the response:
{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400
}
Expected Behavior
Hitting the same endpoint above with 7.0.100-preview.3.22179.4 I correctly see the errors provided in the response:
{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"errors": {
"testError": [
"message"
]
}
}
Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version
7.0.100-preview.4.22252.9
Anything else?
No response