(payload)
| 49 | |
| 50 | |
| 51 | def _model_dict(payload) -> dict[str, Any]: |
| 52 | if payload is None: |
| 53 | return {} |
| 54 | if hasattr(payload, "model_dump"): |
| 55 | return payload.model_dump(exclude_unset=True, exclude_none=False) |
| 56 | return payload if isinstance(payload, dict) else {} |
| 57 | |
| 58 | |
| 59 | def _open_api_error(message: str) -> JSONResponse: |
no outgoing calls
no test coverage detected