Similar to the earlier conversations on this method (see below), this continues a pattern I've flagged before: accumulation of low-level, untested branching logic. I understand this follows the existing style of the method, but each addition makes the eventual refactor larger and the method harder to review as a whole.
I'd like to see argument-validation branches like this (and the timeout-string construction from before) extracted into small, testable methods rather than added inline. Given this has come up multiple times now, including in internal meetings, please treat this as a standing convention going forward, not a case-by-case judgment call.
Final changes to the same method in same PR:
Originally posted by @seanpearsonuk in #4990
Originally posted by @seanpearsonuk in #4990