Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Submit-Renewal doesn't appear to follow ErrorAction #531

Closed
mrdenny opened this issue Jan 12, 2024 · 2 comments
Closed

Submit-Renewal doesn't appear to follow ErrorAction #531

mrdenny opened this issue Jan 12, 2024 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@mrdenny
Copy link

mrdenny commented Jan 12, 2024

I've got Submit-Renewal setup to ignore errors using the -ErrorAction SilentyContinue and the error messages are still being displayed (I'm catching the error via -ErrorVariable).

This is causing my automation to fail since it sees the error being returned.

@rmbolger rmbolger self-assigned this Jan 12, 2024
@rmbolger rmbolger added the question Further information is requested label Jan 12, 2024
@rmbolger
Copy link
Owner

rmbolger commented Jan 12, 2024

Hey @mrdenny, thanks for reaching out. The docs for ErrorAction indicate it only affects non-terminating errors. But all of the errors that are explicitly raised by Submit-Renewal are currently terminating errors like having no account set or a no order found.

If you want to trap those, you'll likely have to put that code in a try/catch block.

Out of curiosity, what sort of errors are you seeing?

@mrdenny
Copy link
Author

mrdenny commented Jan 12, 2024

Ah, that explains why it's acting like it it. I can build in a try catch in there. I'm getting no order errors currently.

@rmbolger rmbolger closed this as completed Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants