Route handlers throw System.Text.Json.JsonReader exception for requests with invalid JSON body rather than returning 422 #36499
Labels
area-minimal
Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc
feature-minimal-actions
Controller-like actions for endpoint routing
old-area-web-frameworks-do-not-use
*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels
Priority:1
Work that is critical for the release, but we could probably ship without
Milestone
Consider the following minimal API:
Sending a request with invalid JSON body but that is otherwise well-formed results in a 500 response, due to the underlying JSON reader exception not being handled by the framework:
We should likely be returning a 422 Unprocessable Entity instead.
The text was updated successfully, but these errors were encountered: