Open DLMousey opened 1 year ago
Alternatively, for pseudo-random status code, we return a totally random status code from a built-in valid status codes array (if there is no configuration) rather than specified status codes in configuration. This also makes default built-in behavior with no required/additional configuration.
What do you think?
Something i neglected to mention on the feature wish list is that the pseudo-random status code selection should be configurable, this would be dictated by 2 keys in the config along the lines of
defaultStatusCode
(the code that will be returned if no random code has been selected) andstatusCodeInvokeChance
(the chance of a pseudo-random status code being selected).Not married to these names they might change during development. This builds on the work done in PR #4