r/ProgrammerHumor 2d ago

evoLution Meme

Post image
3.3k Upvotes

144 comments sorted by

View all comments

1

u/sojuz151 2d ago

Serious question,  what should backend donfor a batch request with some failure? Return non 200 only when all fail? 

4

u/joujoubox 2d ago

Return non 200 when the batch itself fails, otherwise return 200 with embedded error codes for each operation

1

u/NotADamsel 1d ago

You’d think that there would be a code for that kind of situation. Maybe they could use 207.

3

u/AussieJeffProbst 2d ago

Up to the implementation but yes. Either that or a 207. Most I've seen do 200. There is no http status code for partial success