Simple question:
I have a POST endpoint which expects some text input. The text input must not be longer than x characters. If it is I'll respond with an error message.
But which HTTP status code will be the correct one?
0.4.4 403 Forbidden
The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated. [..]
10.4.7 406 Not Acceptable
The resource identified by the request is only capable of generating response entities which have content characteristics not acceptable according to the accept headers sent in the request.
10.4.18 417 Expectation Failed
The expectation given in an Expect request-header field [..] could not be met by this server [..]