Skip to content

Commit 748f1ca

Browse files
committed
Use ValueError
1 parent 96f2052 commit 748f1ca

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

util/opentelemetry-util-genai/src/opentelemetry/util/genai/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def get_content_capturing_mode() -> ContentCapturingMode:
3333
)
3434
== _StabilityMode.DEFAULT
3535
):
36-
raise RuntimeError(
36+
raise ValueError(
3737
"This function should never be called when StabilityMode is default."
3838
)
3939
if not envvar:

util/opentelemetry-util-genai/tests/test_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def test_get_content_caputring_mode_raises_exception_when_semconv_stability_defa
6363
self,
6464
): # pylint: disable=no-self-use
6565
_OpenTelemetrySemanticConventionStability._initialized = False
66-
with self.assertRaises(RuntimeError):
66+
with self.assertRaises(ValueError):
6767
get_content_capturing_mode()
6868

6969
@patch_env_vars("gen_ai_latest_experimental", "INVALID_VALUE")

0 commit comments

Comments
 (0)