From 6181f62d93002f1e1373d94f7c288b9ad1974fbb Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Thu, 21 May 2026 15:31:22 +0200 Subject: [PATCH] Return not found instead of remote error on missing document --- RNS/Utilities/rngit/server.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RNS/Utilities/rngit/server.py b/RNS/Utilities/rngit/server.py index 971e4cca..bcfc8011 100644 --- a/RNS/Utilities/rngit/server.py +++ b/RNS/Utilities/rngit/server.py @@ -3912,6 +3912,8 @@ class ReticulumGitNode(): doc_dir = d break + if not doc_dir: return self.RES_NOT_FOUND.to_bytes(1, "big") + b"Not found" + doc_dir = os.path.join(work_path, scope, str(doc_id)) root_path = os.path.join(doc_dir, "root") @@ -4075,6 +4077,8 @@ class ReticulumGitNode(): doc_dir = d break + if not doc_dir: return self.RES_NOT_FOUND.to_bytes(1, "big") + b"Not found" + doc_dir = os.path.join(work_path, scope, str(doc_id)) root_path = os.path.join(doc_dir, "root")