feat(platform): add Data Fabric error classification and extractor#1784
feat(platform): add Data Fabric error classification and extractor#1784UIPath-Harshit wants to merge 1 commit into
Conversation
bcffcf6 to
3e8f95c
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds first-class Data Fabric (DF) error handling to uipath-platform by (1) classifying DF query-engine error codes into actionable categories and (2) integrating a DF-specific error payload extractor into the existing EnrichedException.error_info routing so callers can reliably extract message, error_code, and trace_id.
Changes:
- Introduces
DataFabricError+DataFabricErrorCategoryand a DF error-code classifier/mapping. - Adds a dedicated
datafabric_extractor and registers it in the error-extractor router. - Annotates
EntitiesServicequery methods with DF error-code metadata and adds tests for classification/extraction/routing.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/uipath-platform/tests/services/test_entities_service.py | Adds a regression test ensuring DF query methods carry DF error-metadata attributes. |
| packages/uipath-platform/tests/errors/test_datafabric_errors.py | Adds tests covering DF error code classification, DF payload extraction, and router behavior for datafabric_ URLs. |
| packages/uipath-platform/src/uipath/platform/errors/datafabric_error_codes.py | Defines DF error code sets, DataFabricErrorCategory, and classify_error_code(). |
| packages/uipath-platform/src/uipath/platform/errors/_extractors/_router.py | Registers datafabric_ service prefix to route to the new DF extractor. |
| packages/uipath-platform/src/uipath/platform/errors/_extractors/_datafabric.py | Implements DF payload extraction for {error, code, traceId} responses. |
| packages/uipath-platform/src/uipath/platform/errors/_datafabric_error.py | Adds the structured DataFabricError model and metadata decorator for DF query methods. |
| packages/uipath-platform/src/uipath/platform/errors/init.py | Exposes DataFabricError and DataFabricErrorCategory as public API exports. |
| packages/uipath-platform/src/uipath/platform/entities/_entities_service.py | Applies DF error metadata decorator to entity query methods. |
| packages/uipath-platform/pyproject.toml | Bumps package version to 0.1.90. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3e8f95c7e6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Map DF query-engine error codes to actionable categories (retryable, bad_sql, infrastructure, data_issue) so callers can decide whether to retry, fix SQL, or surface an infra error. - Add datafabric_error_codes.py with code sets and classify_error_code - Add DataFabricError dataclass with from_enriched_exception / from_response_body - Add extract_datafabric extractor and wire it into the error router - Add attach_datafabric_error_mapping decorator on query_entity_records - Add comprehensive test suite for all new modules - Bump uipath-platform version to 0.1.90 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3e8f95c to
b09f6a0
Compare
|



Summary
DataFabricErrordataclass andDataFabricErrorCategoryenum that classifies DF query engine error codes into actionable categories:retryable,bad_sql,infrastructure,data_issuedatafabric_error payload extractor that parses{"error", "code", "traceId"}responsesEnrichedException.error_infoworks for DF endpointsError code mapping is derived from the DF query engine server (
QueryEngine/common/exceptions/ErrorCodes.java+ExceptionClassifier.java).Companion PR: UiPath/uipath-langchain-python — adds OTEL span instrumentation that consumes this classification.
Test plan
classify_error_codemaps all known DF error codes correctlyDataFabricError.from_enriched_exceptionextracts structured info from a DF 500datafabric_URLs to the new extractoruv run pytest -k "error or enriched or extractor")🤖 Generated with Claude Code