Skip to content

Conversation

@allenporter
Copy link
Contributor

@allenporter allenporter commented Dec 27, 2025

This avoids leaving open a session after running commands and properly catches exceptions in the CLI commands.

Pulled out from #709

This avoids leaving open a session after running commands and properly catches exceptions in the CLI commands.
Copilot AI review requested due to automatic review settings December 27, 2025 15:59
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to properly shutdown the context in the CLI and improve exception handling by adding try-except-finally blocks to the async_command decorator. The changes ensure that resources are cleaned up after running commands and that exceptions are properly caught and logged.

Key Changes:

  • Added exception handling with try-except-finally block in the async command decorator
  • Added logging for uncaught exceptions and error output to stderr
  • Added cleanup call in the finally block to ensure resources are released

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

@allenporter allenporter requested a review from Lash-L December 27, 2025 17:35
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