From 037d573e6e0c803676c1fa8b96538fb6dc861f12 Mon Sep 17 00:00:00 2001 From: PointStar Date: Tue, 12 May 2026 21:22:10 +0300 Subject: [PATCH] log: ListDocumentFoldersAsync prints folder count on success MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the case-scoped query fails (e.g. tenant rejects parentId in where), the ViewModel falls back to ListDocumentFoldersAsync — but a success path with N=0 was silent, leaving the user wondering why the dropdown stayed empty. Add an INF line so the log shows whether N folders came back, so 0-folder tenants are obvious from a glance. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/OutlookAddin.Core/Services/EspoCrmClient.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/OutlookAddin.Core/Services/EspoCrmClient.cs b/src/OutlookAddin.Core/Services/EspoCrmClient.cs index d7fcc2b..11b3076 100644 --- a/src/OutlookAddin.Core/Services/EspoCrmClient.cs +++ b/src/OutlookAddin.Core/Services/EspoCrmClient.cs @@ -390,9 +390,13 @@ namespace MarcusLaw.OutlookAddin.Core.Services { try { - return await GetJsonAsync>( + var result = await GetJsonAsync>( "DocumentFolder?orderBy=name&order=asc&maxSize=200", cancellationToken).ConfigureAwait(false); + _logger.Information( + "ListDocumentFoldersAsync → {Count} folders in tenant", + result?.List?.Count ?? 0); + return result ?? new EspoListResponse(); } catch (Exception ex) {