Skip to content

Improve error messages in utility scripts to be more user-friendly #1189

@coderabbitai

Description

@coderabbitai

Context

As discussed in PR #1173, while we successfully removed unhelpful stack traces from subprocess failures in archive manager scripts, there's an opportunity to make error messages across our utility scripts more user-friendly and actionable.

Current Behavior

When utility scripts encounter errors (e.g., database connection failures), they show technical error messages like:

2025-08-11T21:54:21.671 ERROR [sql_adapter] Error connecting to MariaDB: Can't connect to server on '127.0.0.1' (115)
2025-08-11T21:54:21.671 ERROR [archive_manager] Can't connect to server on '127.0.0.1' (115)
2025-08-11T17:54:22.390 ERROR [archive_manager] Archive manager failed.

Proposed Improvement

Enhance error messages to provide actionable guidance for users, such as:

  • "Archive manager failed. Is the package running?"
  • "Database connection failed. Please ensure the CLP services are running."

Affected Scripts

  • components/clp-package-utils/clp_package_utils/scripts/archive_manager.py
  • components/clp-package-utils/clp_package_utils/scripts/compress.py
  • components/clp-package-utils/clp_package_utils/scripts/search.py
  • components/clp-package-utils/clp_package_utils/scripts/decompress.py

References

Requested by: @haiqi96

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions