Skip to content

Commit 64aabca

Browse files
cristipufuclaude
andcommitted
fix: catch UiPathBaseRuntimeError and add error category to I/O panel
LangGraphRuntimeError extends UiPathBaseRuntimeError (not UiPathRuntimeError), so errors like GraphRecursionError fell through to the generic Exception handler which used code="Unknown". Now catches the base class and surfaces the structured code, title, detail, and category in the error panel. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0294bd1 commit 64aabca

6 files changed

Lines changed: 20 additions & 4 deletions

File tree

src/uipath/dev/server/frontend/src/components/runs/RunDetailsPanel.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,12 @@ function IOView({ run }: { run: RunSummary }) {
300300
>
301301
{run.error.code}
302302
</span>
303+
<span
304+
className="px-1.5 py-0.5 rounded text-[10px] font-mono"
305+
style={{ background: "color-mix(in srgb, var(--error) 20%, var(--bg-secondary))" }}
306+
>
307+
{run.error.category}
308+
</span>
303309
</div>
304310
<div className="p-4 text-xs leading-normal" style={{ background: "var(--bg-secondary)" }}>
305311
<div className="font-semibold mb-2" style={{ color: "var(--text-primary)" }}>

src/uipath/dev/server/frontend/src/types/run.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ export interface RunError {
8181
code: string;
8282
title: string;
8383
detail: string;
84+
category: string;
8485
}
8586

8687
export interface InterruptEvent {

src/uipath/dev/server/serializers.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ def serialize_run(run: ExecutionRun) -> dict[str, Any]:
106106
"code": run.error.code,
107107
"title": run.error.title,
108108
"detail": run.error.detail,
109+
"category": run.error.category.value
110+
if hasattr(run.error.category, "value")
111+
else str(run.error.category),
109112
}
110113
if run.error
111114
else None

src/uipath/dev/server/static/assets/index-D9R_e2zf.js renamed to src/uipath/dev/server/static/assets/index-B6o1WEr7.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/uipath/dev/server/static/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66
<title>UiPath Developer Console</title>
77
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
8-
<script type="module" crossorigin src="/assets/index-D9R_e2zf.js"></script>
8+
<script type="module" crossorigin src="/assets/index-B6o1WEr7.js"></script>
99
<link rel="stylesheet" crossorigin href="/assets/index-BDna691u.css">
1010
</head>
1111
<body>

src/uipath/dev/services/run_service.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@
2727
UiPathDebugProtocol,
2828
UiPathDebugRuntime,
2929
)
30-
from uipath.runtime.errors import UiPathErrorContract, UiPathRuntimeError
30+
from uipath.runtime.errors import (
31+
UiPathBaseRuntimeError,
32+
UiPathErrorContract,
33+
)
3134
from uipath.runtime.events import UiPathRuntimeStateEvent
3235
from uipath.runtime.resumable.trigger import UiPathResumeTrigger
3336

@@ -259,6 +262,9 @@ async def execute(self, run: ExecutionRun) -> None:
259262
"code": err.code if err else "Unknown",
260263
"title": err.title if err else "Unknown error",
261264
"detail": err.detail if err else "",
265+
"category": err.category.value
266+
if err and hasattr(err.category, "value")
267+
else "Unknown",
262268
},
263269
)
264270
run.states.append(error_state)
@@ -285,7 +291,7 @@ async def execute(self, run: ExecutionRun) -> None:
285291
self._add_info_log(run, "✅ Execution completed successfully")
286292
run.end_time = datetime.now()
287293

288-
except UiPathRuntimeError as e:
294+
except UiPathBaseRuntimeError as e:
289295
self._add_error_log(run)
290296
run.status = "failed"
291297
run.end_time = datetime.now()

0 commit comments

Comments
 (0)