> A 400 if you send mangled JSON, but a 200 if the request was valid but does not pass business validation rules.
What about empty required field in JSON? Is it still mangled or it's already BL?
What about empty required field in JSON? Is it still mangled or it's already BL?
200 OK {status: "failed", errors: ["field X is required"]}
How you deal with this on the application side, what JSON statuses you have etc is up to you.
For example, on a server I'm working on there are helper functions that generate different types of responses. Responding in certain ways will produce a 200, but will also log a warning or error.
On the client side, you can create request helpers that all requests go through and that can resolve requests appropriately, rendering error messages to the user etc.
The main thing is to have a well defined, consistent approach.