MCPcopy
hub / github.com/Agenta-AI/agenta / parse_status_code_to_enum

Function parse_status_code_to_enum

api/oss/src/core/tracing/utils.py:375–386  ·  view source on GitHub ↗
(
    status_code: str,
)

Source from the content-addressed store, hash-verified

373
374
375def parse_status_code_to_enum(
376 status_code: str,
377):
378 try:
379 return OTelStatusCode(status_code)
380
381 except ValueError as e:
382 log.error(f"Unsupported status_code value: {status_code}")
383
384 raise FilteringException(
385 f"Unsupported status_code value: {status_code}",
386 ) from e
387
388
389def parse_value_to_enum(value: str, enum: type) -> type:

Callers

nothing calls this directly

Calls 3

OTelStatusCodeClass · 0.90
FilteringExceptionClass · 0.90
errorMethod · 0.45

Tested by

no test coverage detected