Skip to content

Conversation

giuliastf
Copy link
Collaborator

Description
This pull request introduces a new standardized error code enumeration (UiPathErrorCode) for UiPath runtime errors and updates all error handling logic to use this enum instead of raw string codes.

Fix issue

@giuliastf giuliastf self-assigned this Oct 7, 2025
@github-actions github-actions bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-llamaindex Triggers tests in the uipath-llamaindex-python repository labels Oct 7, 2025
@giuliastf giuliastf requested review from Copilot, radu-mocanu and radugheo and removed request for radu-mocanu October 7, 2025 13:52
Copy link

@Copilot 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 pull request introduces standardized error code handling by creating a UiPathErrorCode enum and updating all error handling logic to use enum values instead of raw string codes. This change improves type safety and maintainability of error handling across the UiPath runtime.

  • Added UiPathErrorCode enum with standardized error codes for different categories (entrypoint, execution, HITL, etc.)
  • Updated UiPathRuntimeError constructor to accept UiPathErrorCode enum instead of raw strings
  • Replaced all string-based error codes throughout the codebase with corresponding enum values

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/uipath/_cli/_runtime/_contracts.py Added UiPathErrorCode enum definition and updated UiPathRuntimeError constructor to use enum type
src/uipath/_cli/_runtime/_script_executor.py Updated all error instantiations to use UiPathErrorCode enum values
src/uipath/_cli/_runtime/_runtime.py Updated error handling to use UiPathErrorCode enum
src/uipath/_cli/_runtime/_hitl.py Updated HITL-related error handling to use enum values
pyproject.toml Bumped version from 2.1.72 to 2.1.73

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-llamaindex Triggers tests in the uipath-llamaindex-python repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace string code in UiPathRuntimeError with an Enum

3 participants