Fix/dx 10224 bulk error visibility 2 - #355
Open
harshitha-cstk wants to merge 2 commits into
Open
Conversation
… off Bulk command failures were silently swallowed when log.showConsoleLogs was disabled — handleAndLogError only reaches the console through the winston error transport, which is silenced in that mode, so the terminal showed nothing on failure (e.g. an invalid stack API key). Print a user-facing error line in BaseBulkCommand.catch() when console logs are off, reusing cliErrorHandler.classifyError so the message matches the friendly text written to the log file. Guarded to avoid double-printing when console logs are on. Ref: DX-10224 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bulk command failures (
cm:stacks:bulk-entries/bulk-assets/bulk-taxonomies) were silently swallowed whenlog.showConsoleLogswas disabled. The terminal showed nothing on failure — e.g. an invalid stack API key produced zero output — while the same failure printed correctly with console logs on.Root cause
Errors flow through
handleAndLogError→ the winstonerrorlogger, whose console transport is silenced when console logging is off. The only re-emit path inlogErroris guarded byconsoleLevel !== 'error', which is false for normal errors, so nothing reaches the terminal.Fix
Scoped to the bulk-operations plugin (
base-bulk-command.ts) — no changes tocli-utilities. InBaseBulkCommand.catch(), when console logs are off, print a user-facing error line viacliux.print, reusingcliErrorHandler.classifyErrorso the console message matches the friendly text written to the log file. Guarded to avoid double-printing when console logs are on.All three bulk commands inherit this handler, so all are covered.
Verification
🤖 Generated with Claude Code