fix: show error details in preset catalog config read failure (#3840)

Capture and display the exception message when reading preset-catalogs.yml
fails, instead of swallowing the error details. Matches the pattern used
in preset_catalog_add 54 lines earlier.
This commit is contained in:
Quratulain-bilal
2026-08-10 12:19:36 -05:00
committed by GitHub
parent 2100f59f7e
commit 44c3dc7d3e
+2 -2
View File
@@ -818,8 +818,8 @@ def preset_catalog_remove(
try:
config = yaml.safe_load(config_path.read_text(encoding="utf-8")) or {}
except Exception:
console.print("[red]Error:[/red] Failed to read preset catalog config.")
except Exception as e:
console.print(f"[red]Error:[/red] Failed to read preset catalog config: {e}")
raise typer.Exit(1)
catalogs = config.get("catalogs", [])