4 ms·
If it worked for you, that's fine... but this is completely counter to how most HTTP applications work and definitely not a best practice. Both returning errors
by treve 3y ago
If it worked for you, that's fine... but this is completely counter to how most HTTP applications work and definitely not a best practice. Both returning errors or the interpretation of the meaning of 204.
The author at least suggests using 400, which at the very least will make clients and proxies behave in a predictable way, but ideally you just return the appropriate HTTP status code, and use a well-defined response body to indicate why the specific error was returned.