[PR #429] [MERGED] Pagination nil pointer panic #520

Closed
opened 2026-02-26 22:31:21 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/rudrankriyam/App-Store-Connect-CLI/pull/429
Author: @cursor[bot]
Created: 2/5/2026
Status: Merged
Merged: 2/5/2026
Merged by: @rudrankriyam

Base: cursor/issue-426-refactor-7e7fHead: cursor/pagination-nil-pointer-panic-a6a7


📝 Commits (1)

  • c2777bd Fix typed nil pointer panic in pagination

📊 Changes

2 files changed (+46 additions, -2 deletions)

View changed files

📝 internal/asc/client_pagination.go (+19 -2)
📝 internal/asc/client_pagination_test.go (+27 -0)

📄 Description

Fix panic when PaginateAll receives a typed nil pointer by gracefully handling it and returning an empty response.

The previous reflection-based refactoring introduced a bug where passing a non-nil interface containing a nil pointer (a "typed nil") to PaginateAll would cause a panic. The fix ensures that newEmptyPaginatedResponse and aggregatePageData correctly handle this edge case, preventing crashes and returning an empty, valid response.



🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/rudrankriyam/App-Store-Connect-CLI/pull/429 **Author:** [@cursor[bot]](https://github.com/apps/cursor) **Created:** 2/5/2026 **Status:** ✅ Merged **Merged:** 2/5/2026 **Merged by:** [@rudrankriyam](https://github.com/rudrankriyam) **Base:** `cursor/issue-426-refactor-7e7f` ← **Head:** `cursor/pagination-nil-pointer-panic-a6a7` --- ### 📝 Commits (1) - [`c2777bd`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/c2777bd6a6b6944daa08cf96be176aa613875af9) Fix typed nil pointer panic in pagination ### 📊 Changes **2 files changed** (+46 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `internal/asc/client_pagination.go` (+19 -2) 📝 `internal/asc/client_pagination_test.go` (+27 -0) </details> ### 📄 Description Fix panic when `PaginateAll` receives a typed nil pointer by gracefully handling it and returning an empty response. The previous reflection-based refactoring introduced a bug where passing a non-nil interface containing a nil pointer (a "typed nil") to `PaginateAll` would cause a panic. The fix ensures that `newEmptyPaginatedResponse` and `aggregatePageData` correctly handle this edge case, preventing crashes and returning an empty, valid response. --- --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 22:31:21 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/App-Store-Connect-CLI#520
No description provided.