3 ms·
The error to code in the http handler is the true path. It’s the only place where the context and knowledge is about semantics. In one endpoint if something is
by rollulus 2y ago
The error to code in the http handler is the true path. It’s the only place where the context and knowledge is about semantics. In one endpoint if something is not found it can be a proper 404, if its existence is truly optional. In another endpoint the absence might very well qualify as a 500.
- bvrmn 2y ago404 is quite an ominous thing. 404 because route is not found or entity not found. God bless your monitoring.
- rounce 2y ago422 is frequently used for this case despite being part of the WebDAV extensions.
- Groxx 2y ago100% this. Deciding on end user error handling in a low level is making assumptions that cannot be known at the low level. The caller decides how something is going to be handled and presented, not the callee, or you inevitably miss them in important places and silently miscategorize stuff. Far better to have that scenario lead to a 500 (unmapped error, unknown problem) so it can be fixed.