Expected user/API failure that should be reported as JSON.
| 46 | |
| 47 | |
| 48 | class ModlyCliError(RuntimeError): |
| 49 | """Expected user/API failure that should be reported as JSON.""" |
| 50 | |
| 51 | def __init__(self, message: str, *, code: str = "MODLY_CLI_ERROR", http_status: int | None = None) -> None: |
| 52 | super().__init__(message) |
| 53 | self.message = message |
| 54 | self.code = code |
| 55 | self.http_status = http_status |
| 56 | |
| 57 | |
| 58 | def _json_print(data: dict[str, Any], *, compact: bool = False) -> None: |
no outgoing calls
no test coverage detected