Sync eng/common directory with azure-sdk-tools repository (#6827)

This commit is contained in:
Azure SDK Bot 2025-11-13 15:31:58 -08:00 committed by GitHub
parent 75c821f7d2
commit 046252b054
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 19 additions and 3 deletions

View File

@ -92,7 +92,12 @@ function Upload-SourceArtifact($filePath, $apiLabel, $releaseStatus, $packageVer
}
catch
{
Write-Host "Exception details: $($_.Exception.Response)"
Write-Host "ERROR: API request failed" -ForegroundColor Red
Write-Host "Status Code: $($_.Exception.Response.StatusCode.Value__)" -ForegroundColor Yellow
Write-Host "Error: $($_.Exception.Message)" -ForegroundColor Yellow
if ($_.ErrorDetails.Message) {
Write-Host "Details: $($_.ErrorDetails.Message)" -ForegroundColor Yellow
}
$StatusCode = $_.Exception.Response.StatusCode
}
@ -129,7 +134,12 @@ function Upload-ReviewTokenFile($packageName, $apiLabel, $releaseStatus, $review
}
catch
{
Write-Host "Exception details: $($_.Exception)"
Write-Host "ERROR: API request failed" -ForegroundColor Red
Write-Host "Status Code: $($_.Exception.Response.StatusCode.Value__)" -ForegroundColor Yellow
Write-Host "Error: $($_.Exception.Message)" -ForegroundColor Yellow
if ($_.ErrorDetails.Message) {
Write-Host "Details: $($_.ErrorDetails.Message)" -ForegroundColor Yellow
}
$StatusCode = $_.Exception.Response.StatusCode
}

View File

@ -74,7 +74,13 @@ function Submit-Request($filePath, $packageName, $packageType)
}
catch
{
LogError "Error $StatusCode - Exception details: $($_.Exception.Response)"
Write-Host "ERROR: API request failed" -ForegroundColor Red
Write-Host "Status Code: $($_.Exception.Response.StatusCode.Value__)" -ForegroundColor Yellow
Write-Host "Error: $($_.Exception.Message)" -ForegroundColor Yellow
if ($_.ErrorDetails.Message) {
Write-Host "Details: $($_.ErrorDetails.Message)" -ForegroundColor Yellow
}
LogError "Failed to detect API changes. See details above."
$StatusCode = $_.Exception.Response.StatusCode
}