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: extract handler transform for ut, handle undefined #530

Merged
merged 1 commit into from
Apr 11, 2024

Conversation

mshanemc
Copy link
Contributor

the error catch on SfError is doing some transformation for sfError.

it's possible to have a context: undefined on the sfError.
in existing logic for context in error to return true (prop exists, not that it is necessarily defined)

context: 'context' in error ? error.context : this.statics.name,

so that context stays undefined

NUTs caught this here https://github.com/salesforcecli/plugin-source/actions/runs/8636061623/job/23675553032?pr=1153#step:13:246

Note: this could be a behavior change in SfError's handling of undefined context, but using sfCommand to ensure that context comes off the command also fixes it (and probably fixes it better since sfCommand has access to the command name that we use as a backup).

@mshanemc mshanemc merged commit 7eb46a8 into main Apr 11, 2024
44 checks passed
@mshanemc mshanemc deleted the sm/handle-undefined-context-and-name branch April 11, 2024 17:24
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