Skip to content

Conversation

@cristipufu
Copy link
Member

@cristipufu cristipufu commented Jul 4, 2025

Pull Request Overview

This PR improves error handling in the session runtime, conditions tracer initialization, and updates the package version.

  • Wraps message processing in _run_server with a try/except to log errors and return a JSONRPCError to the client.
  • Logs the server’s stderr output when capturing runtime errors.
  • Only initializes the OpenTelemetry tracer if a job_id is present in the context.
  • Bumps the project version from 0.0.93 to 0.0.94.

@cristipufu cristipufu self-assigned this Jul 4, 2025
Copy link

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 improves error handling in the session runtime, conditions tracer initialization, and updates the package version.

  • Wraps message processing in _run_server with a try/except to log errors and return a JSONRPCError to the client.
  • Logs the server’s stderr output when capturing runtime errors.
  • Only initializes the OpenTelemetry tracer if a job_id is present in the context.
  • Bumps the project version from 0.0.93 to 0.0.94.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/uipath_mcp/_cli/_runtime/_session.py Added exception handling around incoming messages and stderr logging.
src/uipath_mcp/_cli/_runtime/_runtime.py Guarded tracer setup on presence of context.job_id.
pyproject.toml Updated project version to 0.0.94.
Comments suppressed due to low confidence (1)

src/uipath_mcp/_cli/_runtime/_session.py:143

  • The new error-handling path isn’t covered by existing tests. Please add unit tests or integration tests to verify that invalid messages trigger the JSONRPCError response and that logging behaves as expected.
                            except Exception as e:

@cristipufu cristipufu force-pushed the fix/error_handling_invalid_messages branch from 74f105a to be41619 Compare July 4, 2025 13:37
@cristipufu cristipufu merged commit 41fff58 into main Jul 4, 2025
6 checks passed
@cristipufu cristipufu deleted the fix/error_handling_invalid_messages branch July 4, 2025 13:39
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.

2 participants