Skip to content

core: Improve error outputs across core functions - #12378

Merged
CrazyWolf13 merged 2 commits into
mainfrom
fix/improve-error-outputs
Feb 27, 2026
Merged

core: Improve error outputs across core functions#12378
CrazyWolf13 merged 2 commits into
mainfrom
fix/improve-error-outputs

Conversation

@MickLesk

@MickLesk MickLesk commented Feb 26, 2026

Copy link
Copy Markdown
Member

✍️ Description

qoL Fixes and Imrovments

  • Replaced raw echo -e messages with structured msg_error/msg_warn/msg_info calls across all three core files for consistent formatting.
  • Added error checking to previously unchecked critical commands (pveam download, apk add, apt install, systemctl enable).
  • Converted silent return 1 / return 0 failure paths into explicit warnings so users actually see what went wrong (e.g. failed API calls, missing tags, repo validation).
  • Eliminated || true swallowing on non-trivial operations (composer, mysql upgrades, rustup) — replaced with msg_warn so failures are visible but non-fatal.
  • Added context to error messages: URLs, retry counts, storage names, method lists — making diagnosis easier.
  • Fixed bare exit calls to use proper exit codes (exit 0 / exit 1).
  • Added graceful fallback when error_handler.func download fails inside containers, preventing silent breakage.
  • Replaced [DEBUG] raw echos and leftover troubleshooting prints with proper msg_warn/msg_custom calls.

🔗 Related Issue

Fixes #

✅ Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected.
  • No security risks – No hardcoded secrets, unnecessary privilege escalations, or permission issues.

🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • 🆕 New script – A fully functional and tested script or script set.
  • 🌍 Website update – Changes to website-related JSON files or metadata.
  • 🔧 Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • 📝 Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.

@MickLesk
MickLesk marked this pull request as ready for review February 27, 2026 07:26
@MickLesk
MickLesk requested a review from a team as a code owner February 27, 2026 07:26
Comment thread misc/tools.func Outdated
Comment thread misc/tools.func
@CrazyWolf13
CrazyWolf13 merged commit 774bbbc into main Feb 27, 2026
1 check passed
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Mar 3, 2026
@MickLesk
MickLesk deleted the fix/improve-error-outputs branch March 23, 2026 20:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants