Skip to content

Commit 83a0dec

Browse files
authored
[instrumentation] fix: let wrapped exceptions bubble up (#19566)
* fix: let wrapped exceptions bubble up * bump version
1 parent 2d5413a commit 83a0dec

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

llama-index-instrumentation/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ dev = ["pytest>=8.4.0", "pytest-asyncio>=1.0.0", "pytest-cov>=6.1.1"]
77

88
[project]
99
name = "llama-index-instrumentation"
10-
version = "0.3.0"
10+
version = "0.3.1"
1111
description = "Add your description here"
1212
readme = "README.md"
1313
authors = [{name = "Massimiliano Pippi", email = "mpippi@gmail.com"}]

llama-index-instrumentation/src/llama_index_instrumentation/dispatcher.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -287,14 +287,7 @@ def handle_future_result(
287287
context: Context,
288288
) -> None:
289289
try:
290-
exception = future.exception()
291-
if exception is not None:
292-
if exception.__class__.__name__ == "WorkflowCancelledByUser":
293-
result = None
294-
else:
295-
raise exception
296-
else:
297-
result = future.result()
290+
result = None if future.exception() else future.result()
298291

299292
self.span_exit(
300293
id_=span_id,

0 commit comments

Comments
 (0)