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

fix: throw from catch #229

Merged
merged 3 commits into from
Feb 21, 2023
Merged

fix: throw from catch #229

merged 3 commits into from
Feb 21, 2023

Conversation

mdonnalley
Copy link
Contributor

@mdonnalley mdonnalley commented Feb 20, 2023

  • Throws error from catch so that unit tests can use shouldThrow
  • Removes SfError instance checks in catch to prevent testing issues with multiple versions of sfdx-core being used across the dependency tree

[skip-validate-pr]

@@ -526,3 +536,8 @@ export namespace SfCommand {
context?: string;
}
}

function removeEmpty(obj: Record<string, unknown>): Record<string, unknown> {
Copy link
Contributor

Choose a reason for hiding this comment

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

non-blocking: are we sure we want to remove empty key/values from the error? it might make it hard for consumers to depend on the type returned?

@mdonnalley mdonnalley merged commit 6dcb16f into main Feb 21, 2023
@mdonnalley mdonnalley deleted the mdonnalley/throw-from-catch branch February 21, 2023 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants