Skip to content

Commit

Permalink
add logging to import/export
Browse files Browse the repository at this point in the history
  • Loading branch information
sei-jmattson committed Oct 11, 2024
1 parent ef9cfd9 commit 41f0f56
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/TopoMojo.Api/Features/Admin/TransferService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -310,11 +310,11 @@ private async Task<Stream> CreateZipfile(IEnumerable<Workspace> data, IEnumerabl
);

// export markdown doc artifacts
try
foreach (var topo in data)
{
foreach (var topo in data)
string filePath = Path.Combine(docPath, topo.Id);
try
{
string filePath = Path.Combine(docPath, topo.Id);
if (File.Exists(filePath + ".md"))
{
WriteFileToArchive(
Expand All @@ -334,8 +334,11 @@ await File.ReadAllBytesAsync(docFile)
}
}
}
catch (Exception ex)
{
_logger.LogError(ex, "Failed to zip {filePath}", filePath);
}
}
catch { }
}

zipStream.Position = 0;
Expand Down

0 comments on commit 41f0f56

Please sign in to comment.