log: ListDocumentFoldersAsync prints folder count on success

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) <noreply@anthropic.com>
This commit is contained in:
PointStar
2026-05-12 21:22:10 +03:00
parent cb7d530b4c
commit 037d573e6e
@@ -390,9 +390,13 @@ namespace MarcusLaw.OutlookAddin.Core.Services
{
try
{
return await GetJsonAsync<EspoListResponse<DocumentFolder>>(
var result = await GetJsonAsync<EspoListResponse<DocumentFolder>>(
"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<DocumentFolder>();
}
catch (Exception ex)
{