3 ms·
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.
by WrtCdEvrydy 6y ago
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.