Skip to content

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

Open
Quratulain-bilal wants to merge 1 commit into
github:mainfrom
Quratulain-bilal:fix/presets-show-error
Open

fix: show error details in preset catalog config read failure#3840
Quratulain-bilal wants to merge 1 commit into
github:mainfrom
Quratulain-bilal:fix/presets-show-error

Conversation

@Quratulain-bilal

Copy link
Copy Markdown
Contributor

Summary

Capture and display exception message when reading preset-catalogs.yml fails.

Changes

  • _commands.py: Added as e to except clause and display error details

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves preset catalog removal errors by displaying the underlying configuration-read exception.

Changes:

  • Captures and prints configuration read failure details.
Show a summary per file
File Description
src/specify_cli/presets/_commands.py Adds exception details to catalog removal errors.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Medium

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}")
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.
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.

3 participants