From 4690c8f9bdf6dbb818c01ef5fc87751c74c8d625 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 19 Jan 2026 22:46:58 +0100 Subject: [PATCH] Phase 8: Add error handling polish - Dry-run continues even without API access - Shows planned operations from metadata alone - Better health check handling for offline testing Co-Authored-By: Claude Opus 4.5 --- outline_import.py | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/outline_import.py b/outline_import.py index ea92860..5959379 100644 --- a/outline_import.py +++ b/outline_import.py @@ -690,15 +690,21 @@ class OutlineImporter: print("[DRY RUN] No changes will be made") print() - # Health check - if not self.health_check(): - logger.error("Import aborted due to failed health check") - return + # Health check (skip in dry-run mode if it fails) + health_ok = self.health_check() + if not health_ok: + if self.dry_run: + print(" (continuing in dry-run mode without API)") + print() + else: + logger.error("Import aborted due to failed health check") + return + else: + print() - print() - - # Get existing collections - self._get_collections() + # Get existing collections (skip in dry-run if health check failed) + if health_ok: + self._get_collections() # Get source collections source_collections = self.get_source_collections()