News for hackers. Stuff that matters.
Re:JSON Schema bundling formalised by jonathanlydall on Friday September 10, 2021 @06:59AM (#28479846)
I feel exactly the same.

I also want to add that consumers with an appropriate framework can automatically generate a response body explaining where in the payload that errors were encountered and what those errors are. This allows API consumers to understand what is going wrong far more easily that a 500 being returned.

ASP.NET for example can do exactly this with validation on incoming payloads.

If the payload is invalid, then either way there will be an error, but it's nice to be able to give more helpful errors.

Re:JSON Schema bundling formalised by dolmen on Friday September 10, 2021 @09:25AM (#28481194)
Input validation errors should be reported using HTTP code 400.