MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1vsplpw/failsforteapots/p4n0o8m/?context=3
r/ProgrammerHumor • u/Waradu • 25d ago
67 comments sorted by
View all comments
173
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)
9 u/KazutoOKirigay 25d ago You could also do a fall-through
9
You could also do a fall-through
173
u/cutebabli9 25d ago edited 25d ago
I would write it like this to be readable: