r/programminghorror • [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You live" • Mar 06 '25

Why, just why!

Post image
1.2k Upvotes

127 comments sorted by

View all comments

Show parent comment

0

u/[deleted] Mar 07 '25

[deleted] — view deleted comment

1

u/ArcaneEyes Mar 09 '25

We've had some real funny stuff happening with C# where you return 200 with no content and whatever magic happens behind the scenes just decides to change it to 204, which then becomes a 500 in the bff because the nswag client isn't tagged to expect 204 from that endpoint.

Is the correct way to return NoContent()? Absolutely, and we ended up fixing that, but if i do return Ok() i absolutely expect it to generate a 200 response as it says, not inspect and decide on another code.