atlassian / atlassian/go-sentry-api

Pagination code no longer seems to work.

Open
#41 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
55
Forks
45
PR merge metrics
No merged PRs in 30d

Description

The pagination code assumes a relative URL for the Next/Previous links

```
// GetPage will fetch a page via the Link object and decode it from out.
// Should be used like `client.GetPage(link.Previous, make([]Organization, 0))`
func (c *Client) GetPage(p Page, out interface{}) (*Link, error) {
return c.rawWithPagination("GET", strings.TrimPrefix(p.URL, c.Endpoint), out, nil)
}
```
It prepends the Endpoint URL to the link URL. This worked until recently as Sentry .io API now returns full URLs for the link.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the GetPage function shown in the issue and trace how it calls rawWithPagination and handles p.URL. Verify the behavior with both relative and full Next/Previous links; the work is done when full Sentry API URLs are fetched correctly without an incorrect Endpoint prefix.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.