3 ms·
I think this is essentially incorrect. However. It can sometimes be practical to wrap a model in a result object. I agree with that. The thing with response co
by AtNightWeCode 4y ago
I think this is essentially incorrect. However. It can sometimes be practical to wrap a model in a result object. I agree with that.
The thing with response codes is that they are often logged in contexts where it is unpractical to read and parse the response body. Like for rate-limit rules in layer 7 proxies and so on.
404 are overused though. Sometimes it is better to design around the problem to only get “real” 404:s so to say. 204:s can also be used even though any REST fanatic will disagree with that.
- AtNightWeCode 4y agoIt is always baffling what you get downvoted for on HN. To have a get by id endpoint that does not return 404 if the entity is not found. Well, I fired people for less than that.