Skip to content

Fix panic when rate limit response has no resources - #144

Merged
henrymcconville merged 3 commits into
masterfrom
fix/collect-nil-rate-limits
Nov 1, 2026
Merged

henrymcconville merged 3 commits into
masterfrom
fix/collect-nil-rate-limits

Conversation

@henrymcconville

Copy link
Copy Markdown
Collaborator

RateLimit.Get returns nil rates with no error when a successful response omits the resources object, which caused a nil pointer dereference in Collect and crashed the exporter. Return an error instead, in line with other API failures.

Also add regression tests covering issue #77, checking a scrape ends cleanly when any endpoint returns 403.

henrymcconville and others added 3 commits November 1, 2026 17:19
RateLimit.Get returns nil rates with no error when a successful response
omits the resources object, which caused a nil pointer dereference in
Collect and crashed the exporter. Return an error instead, in line with
other API failures.

Also add regression tests covering issue #77, checking a scrape ends
cleanly when any endpoint returns 403.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@henrymcconville
henrymcconville merged commit 6bfc91c into master Nov 1, 2026
4 checks passed
@henrymcconville
henrymcconville deleted the fix/collect-nil-rate-limits branch November 1, 2026 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant