Render a workflow's return value for the section (capped).
(result: Any)
| 194 | |
| 195 | |
| 196 | def _render_result(result: Any) -> str | None: |
| 197 | """Render a workflow's return value for the <result> section (capped).""" |
| 198 | if result is None: |
| 199 | return None |
| 200 | if isinstance(result, str): |
| 201 | text = result |
| 202 | else: |
| 203 | try: |
| 204 | text = json.dumps(result, default=str, ensure_ascii=False) |
| 205 | except Exception: |
| 206 | text = str(result) |
| 207 | return text[:4000] |
| 208 | |
| 209 | |
| 210 | def enqueue_workflow_notification( |
no outgoing calls
no test coverage detected