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

Add exception message for missing rules #1968

Merged
merged 5 commits into from
Mar 14, 2025

Conversation

Tadas
Copy link
Contributor

@Tadas Tadas commented Feb 16, 2024

PR Summary

Fixes #1875

PR Checklist

CultureInfo.CurrentCulture,
Strings.RulesNotFound),
ErrorCategory.ResourceExists,
new Exception(errorMessage),
Copy link
Collaborator

@bergmeister bergmeister Feb 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where this error is thrown, are we sure the only reason could be missing rules @Tadas ?
Kicked off CI for now to see what tests say

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bergmeister I know we didn't get an answer to this; thoughts on merging for v1.3?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, on closer inspection of the diff, only 2 things are changing and they aren't of concern:

  • errorMessage is passed into Exception instead of nothing, which is an improvement
  • ErrorCategory is changed from ResourceExists to ResourceUnavailable, which I guess is a bit better but ObjectNotFound is maybe even better so will change it to that. This is the same category that gci notExists returns

@andyleejordan andyleejordan enabled auto-merge (squash) March 14, 2025 18:20
@andyleejordan andyleejordan merged commit ae712f7 into PowerShell:main Mar 14, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants