Skip to content

Commit cecfb42

Browse files
authored
Bugfix/issue-1104: Handle Timeout while fetching Sign-In logs (#1129)
* Handle SignIn timeout separately and log partial export instead of warning * made changes as per copilot's suggestions
1 parent a0ceaaa commit cecfb42

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/powershell/private/export/Wait-ZtTenantDataExport.ps1

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,13 @@
4848
foreach ($failure in @($groups).Where{$_.Name -eq 'Failed'}.Group) {
4949
if ($failedExports[$failure.Name]) { continue }
5050
$failedExports[$failure.Name] = $true
51-
Write-PSFMessage -Level Warning -Message "Export '{0}' failed: {1}" -StringValues $failure.Name, $failure.Message
51+
52+
# SignIn timeout is expected for large tenants - log to file, not console WARNING
53+
if ($failure.Name -eq 'SignIn' -and $failure.Message -like '*HttpClient.Timeout*') {
54+
Write-ZtExportProgress -ExportName $failure.Name -LogsPath $LogsPath -Action Error -ErrorMessage "$($failure.Message); only partial sign-in data was collected."
55+
} else {
56+
Write-PSFMessage -Level Warning -Message "Export '{0}' failed: {1}" -StringValues $failure.Name, $failure.Message
57+
}
5258
}
5359

5460
$status = "$($Workflow.Queues["Results"].Count) / $totalCount | Pending: $($countPending) | Waiting: $($countWaiting) | In Progress: $($countInProgress) | Done: $($countDone) | Failed: $($countFailed)"

0 commit comments

Comments
 (0)