News for hackers. Stuff that matters.
Re:How can you not be romantic about programming? (2020) by WrtCdEvrydy on Sunday February 21, 2021 @10:43AM (#26214257)
2XX level is for the action succeeding. 4XX level is for the action failing due to the user. 5XX level is for the action failing due to the service/code/infra.

In the real world, updating your balance to the same number should be a 200, however in some weird financial world, it may be a 400 because you may not be allowed to set the same balance due to some financial rule. A 500 is a terrible choice unless setting the balance caused an error at your code/infrastructure level.

There are no comments on this comment yet.