Return an ErrorResult if the envelope reports failure, else None.
(res: Dict[str, Any])
| 68 | # All WorkOrderItem fields are Optional, so docs missing columns convert cleanly. |
| 69 | # --------------------------------------------------------------------------- # |
| 70 | def _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 | |
| 77 | def _mutation( |
no test coverage detected