For example, we have an API POST /test, which only accept name: AA or name: BB headers.
If a client send a name: CC header, which status code is preferred?
400? 404? 500?
For example, we have an API POST /test, which only accept name: AA or name: BB headers.
If a client send a name: CC header, which status code is preferred?
400? 404? 500?
If is a permission problem maybe you can send 403 (forbidden). 404 is not found and is not the correct meaning of that and 500 is a server error.