We had to do this in order to show the user a relevant error message because our system is behind apache and it doesn't forward the content body from wsgi for (IIRC) whole classes of error codes.
Re:Programming Is Hard
by PH95VuimJjqBqy on Wednesday September 20, 2023 @12:32PM
(#37586303)
This particular thing is a matter of opinion, there are pro's and con's to each approach.
The question is what constitutes an error and should web semantics and application semantics align?
should I return a 404 on a missing record, and if I do, how can I differentiate between that and a routing error?
My point is that you're confidently stating something where both sides are neither right nor wrong, they simply value different things.
Reminds me of Petet Gabriel's Worse Is Better[0], one of the insights of which is that it's often better to fail for edge cases than try to handle every single one.
[0] https://dreamsongs.com/WorseIsBetter.html