This code is generating the required order params which is getting printed on the console for passing it to the modify SL order function which has the following code.
Expectation - This is the first time I am facing this issue and the code had been running without any issues till today. Find it surprising that there is an input exception for quantity which I understand is an optional argument.