I am working on a project where we are using some beta powershell modules provided by the vendor. They keep changing and they do contain errors which have been masked with -erroraction silentlycontinue. Basically they are making rest call to look for a thing, if it errors, then create it. As far as I’m concerned the module does what it is meant to do.
Except, even though the error is set to silently continue, these errors have been captured by octopus. I can run the code fine in a powershell session on the host but when I run it inside octopus, Octopus thinks there is an error. I don’t want to have to recode the changing module everytime, trying to fix their module is their job and they have written their code expecting errors to tell them when something doesn’t exist.
My question
Can Octopus respect the -erroraction setting for a line of code? or perhap asked another way, how can I trap or ignore an error that has already been hidden by the parameter -erroraction silentlycontinue inside an octopus step?