(operation, *, error_message: str = "File access error")
| 41 | |
| 42 | |
| 43 | async def _run_file(operation, *, error_message: str = "File access error"): |
| 44 | try: |
| 45 | result = await run_maybe_async(operation) |
| 46 | return result |
| 47 | except ChatServiceError as exc: |
| 48 | return error(str(exc)) |
| 49 | except (FileNotFoundError, OSError): |
| 50 | return error(error_message) |
| 51 | |
| 52 | |
| 53 | async def _upload_file(file: UploadFile, service: ChatService): |
no test coverage detected