From 0442e53b54881e55cfd6c674b5573f85ab0e9ad4 Mon Sep 17 00:00:00 2001 From: Ngo Quoc Dat Date: Fri, 18 Sep 2026 07:43:20 +0700 Subject: [PATCH] fix(diagnostics): publish the error shape rather than its text in three logs --- TablePro/Core/MCP/Outside/MCPRemoteToolCoordinator.swift | 2 +- TablePro/Views/Export/ExportTreeBuilder.swift | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/TablePro/Core/MCP/Outside/MCPRemoteToolCoordinator.swift b/TablePro/Core/MCP/Outside/MCPRemoteToolCoordinator.swift index 5486ea86a3..b5ecd4245d 100644 --- a/TablePro/Core/MCP/Outside/MCPRemoteToolCoordinator.swift +++ b/TablePro/Core/MCP/Outside/MCPRemoteToolCoordinator.swift @@ -70,7 +70,7 @@ internal final class MCPRemoteToolCoordinator { Self.logger.error( """ MCP server \(configuration.id, privacy: .public) did not list its tools: \ - \(error.localizedDescription, privacy: .public) + \(error.publicLogShape, privacy: .public) """ ) await detachAll(serverId: configuration.id) diff --git a/TablePro/Views/Export/ExportTreeBuilder.swift b/TablePro/Views/Export/ExportTreeBuilder.swift index b20458502c..b9b6886990 100644 --- a/TablePro/Views/Export/ExportTreeBuilder.swift +++ b/TablePro/Views/Export/ExportTreeBuilder.swift @@ -108,7 +108,7 @@ struct ExportDriverMetadataReader: ExportMetadataReading { return grouped } } catch { - Self.logger.warning("Export catalog read failed: \(error.localizedDescription, privacy: .public)") + Self.logger.warning("Export catalog read failed: \(error.publicLogShape, privacy: .public)") return [:] } } @@ -290,7 +290,7 @@ struct ExportTreeBuilder { return try await reader.fetchTables(schema: isCurrentDatabase ? nil : database) } catch { Self.logger.warning( - "Export tree read no tables for \(database, privacy: .public): \(error.localizedDescription, privacy: .public)" + "Export tree read no tables for \(database, privacy: .public): \(error.publicLogShape, privacy: .public)" ) return [] }