Skip to content

fix(bulk-operations): surface errors on console when console logs are off [DX-10224] - #352

Open
harshitha-cstk wants to merge 4 commits into
fix/console-log-policy-pluginsfrom
fix/DX-10224-bulk-error-visibility
Open

fix(bulk-operations): surface errors on console when console logs are off [DX-10224]#352
harshitha-cstk wants to merge 4 commits into
fix/console-log-policy-pluginsfrom
fix/DX-10224-bulk-error-visibility

Conversation

@harshitha-cstk

@harshitha-cstk harshitha-cstk commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Bulk command failures (cm:stacks:bulk-entries / bulk-assets / bulk-taxonomies) were silently swallowed when log.showConsoleLogs was 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 winston error logger, whose console transport is silenced when console logging is off. The only re-emit path in logError is guarded by consoleLevel !== '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 to cli-utilities. In BaseBulkCommand.catch(), when console logs are off, print a user-facing error line via cliux.print, reusing cliErrorHandler.classifyError so 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

  • Logs OFF → friendly error now prints (was silent).
  • Logs ON → error prints exactly once (no duplicate).

🤖 Generated with Claude Code

… 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>
@harshitha-cstk
harshitha-cstk requested a review from a team as a code owner August 18, 2026 07:53
@snyk-io

snyk-io Bot commented Aug 18, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@github-actions

Copy link
Copy Markdown

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 0 0 25 ✅ Passed
🟡 Medium Severity 0 0 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 365 days ✅ Passed

✅ BUILD PASSED - All security checks passed

@github-actions

Copy link
Copy Markdown

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 0 0 25 ✅ Passed
🟡 Medium Severity 0 0 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 365 days ✅ Passed

✅ BUILD PASSED - All security checks passed

@github-actions

Copy link
Copy Markdown

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 0 0 25 ✅ Passed
🟡 Medium Severity 0 0 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 365 days ✅ Passed

✅ BUILD PASSED - All security checks passed

…lity

Post-merge, the console-log state moved from configHandler.get('log').
showConsoleLogs to the process-wide console-policy module, and the
configHandler import was dropped. catch() still referenced configHandler,
breaking the build (TS2304).

Switch the guard to isConsoleLogEnabled() so the friendly error line still
prints on failure when console logs are off, without double-printing when
they are on. Matches the convention the rest of the file now follows.

Ref: DX-10224

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 0 0 25 ✅ Passed
🟡 Medium Severity 0 0 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 365 days ✅ Passed

✅ BUILD PASSED - All security checks passed

@harshitha-cstk

Copy link
Copy Markdown
Contributor Author

opened a new PR: #355

@harshitha-cstk
harshitha-cstk changed the base branch from development to fix/console-log-policy-plugins August 19, 2026 14:22
@github-actions

Copy link
Copy Markdown

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 0 0 25 ✅ Passed
🟡 Medium Severity 0 0 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 365 days ✅ Passed

✅ BUILD PASSED - All security 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

Development

Successfully merging this pull request may close these issues.

1 participant