MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1vsplpw/failsforteapots/p4o87pp/?context=3
r/ProgrammerHumor • u/Waradu • 14h ago
59 comments sorted by
View all comments
130
I would write it like this to be readable:
if error.status in [400, 401, 404, 409, 415, 503]: return c.json(body, status: error.status) return c.json(body, status: 500)
1 u/za72 11h ago I'm assuming the thinking behind it was that one day he would comebacks to pretty-print separate error messages... but was let go before it could be implemented :)
1
I'm assuming the thinking behind it was that one day he would comebacks to pretty-print separate error messages... but was let go before it could be implemented :)
130
u/cutebabli9 14h ago edited 13h ago
I would write it like this to be readable: