refactor: replace magic numbers with named constants in bodyAllowedForStatus (#4529)