MCPcopy
hub / github.com/IBM/AssetOpsBench / _failed

Function _failed

src/servers/wo/main.py:70–74  ·  view source on GitHub ↗

Return an ErrorResult if the envelope reports failure, else None.

(res: Dict[str, Any])

Source from the content-addressed store, hash-verified

68# All WorkOrderItem fields are Optional, so docs missing columns convert cleanly.
69# --------------------------------------------------------------------------- #
70def _failed(res: Dict[str, Any]) -> Optional[ErrorResult]:
71 """Return an ErrorResult if the envelope reports failure, else None."""
72 if not res.get("success"):
73 return ErrorResult(error=res.get("error", "unknown error"))
74 return None
75
76
77def _mutation(

Callers 9

_mutationFunction · 0.85
list_workordersFunction · 0.85
get_workorderFunction · 0.85
get_workorder_tasksFunction · 0.85
get_workorder_costsFunction · 0.85
get_workorder_kpisFunction · 0.85
get_schedule_calendarFunction · 0.85

Calls 2

ErrorResultClass · 0.70
getMethod · 0.45

Tested by

no test coverage detected