-
Notifications
You must be signed in to change notification settings - Fork 4
feat!: better error handling in SfCommand.catch #568
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
Conversation
QA setup: checkout branch, build, yarn link to global sf npm folder 🟢 prints error with actions
🟢 error json
🟢 error telemetry is recorded
🔴 custom oclif error codes aren't applied
Should be a |
QA round 2 🟢 custom oclif error codes are applied
🟢
|
Changes SfCommandError to be a class that extends SfError so that it can be thrown, handle error conversion, and a JSON conversion. More properties from the error in the catch are displayed, returned, and sent to telemetry.
This is a new major version since:
SfCommand.toErrorJson()
was removed. This is now handled bySfCommandError.toJson()
.SfCommandError.code
has changed from being a number to a string. The value for this is from the original error first, followed by the error name if it's an SfError, followed by the exit code as a string.@W-14625499@