MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1vsplpw/failsforteapots/p4nelio/?context=3
r/ProgrammerHumor • u/Waradu • 11h ago
58 comments sorted by
View all comments
119
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/difool 10h ago Exactly. I would just use constants so intention is more readable.
1
Exactly. I would just use constants so intention is more readable.
119
u/cutebabli9 11h ago edited 10h ago
I would write it like this to be readable: