Skip to content

Commit 9fcba3b

Browse files
Harden rate limit logging per review feedback
1 parent 591a756 commit 9fcba3b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/ratelimit.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ $label = $env:PSMODULE_GITHUB_SCRIPT_RATELIMIT_LABEL
1111

1212
LogGroup " - Rate Limit ($label)" {
1313
try {
14-
Get-GitHubRateLimit | Format-Table -AutoSize | Out-String
14+
Get-GitHubRateLimit -ErrorAction Stop |
15+
Select-Object Name, Limit, Used, Remaining, ResetsAt, ResetsIn |
16+
Format-Table -AutoSize | Out-String
1517
} catch {
1618
Write-Warning "Could not retrieve rate limit information: $($_.Exception.Message)"
1719
}

0 commit comments

Comments
 (0)