From 3f2060e460d8848d242fbe437056845669c7d816 Mon Sep 17 00:00:00 2001 From: Danny Canter Date: Thu, 29 Jan 2026 18:25:48 -0800 Subject: [PATCH] DirectoryWatcher: Small adjustments (#1112) - Have the handler throw - Log the failure at error level --- Sources/Helpers/APIServer/DirectoryWatcher.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/Helpers/APIServer/DirectoryWatcher.swift b/Sources/Helpers/APIServer/DirectoryWatcher.swift index 725d7c6f..143bc4cd 100644 --- a/Sources/Helpers/APIServer/DirectoryWatcher.swift +++ b/Sources/Helpers/APIServer/DirectoryWatcher.swift @@ -59,9 +59,9 @@ public class DirectoryWatcher { do { let files = try FileManager.default.contentsOfDirectory(atPath: directoryURL.path) - try? handler(files.map { directoryURL.appending(path: $0) }) + try handler(files.map { directoryURL.appending(path: $0) }) } catch { - self.log.info("failed to run handler for \(directoryURL.path)") + self.log.error("failed to run DirectoryWatcher handler", metadata: ["error": "\(error)", "path": "\(directoryURL.path)"]) } }