(operation, *, prefix: str)
| 63 | |
| 64 | |
| 65 | async def _run(operation, *, prefix: str): |
| 66 | try: |
| 67 | result = await run_maybe_async(operation) |
| 68 | return _ok_result(result) |
| 69 | except BackupServiceError as exc: |
| 70 | return error(str(exc)) |
| 71 | except Exception as exc: |
| 72 | logger.error("%s: %s", prefix, exc, exc_info=True) |
| 73 | return error(f"{prefix}: {exc!s}") |
| 74 | |
| 75 | |
| 76 | def _download_response(download) -> FileResponse: |
no test coverage detected