Invalid body result in null ODataActionPararmeters
@xuzhg is already working on this.
Since Nov 16, 2022.
- Dominant language
- C#
- Stars
- 505
- Forks
- 186
- PR merge metrics
- No merged PRs in 30d
Description
Assemblies affected
ASP.NET Core OData 8.x
Describe the bug
When calling an action (and presumably a function as well) that accepts parameters with a body that is not valid json, is empty or has the wrong content type will not result in a 400 Bad Request or 415 Media Type Not Support. Instead the method on the controller will receive a null ODataActionParameters.
Reproduce steps
Using the routing sample, call Customer(1)/BoundAction with an empty content or invalid json body.
Request/Response
BoundAction of Customers with key 1 : null
Expected behavior
400 Bad Request
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.