Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pagination code no longer seems to work. #41

Open
ArcticSnowman opened this issue Jun 15, 2023 · 1 comment
Open

Pagination code no longer seems to work. #41

ArcticSnowman opened this issue Jun 15, 2023 · 1 comment

Comments

@ArcticSnowman
Copy link

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.

@cwood
Copy link
Collaborator

cwood commented Sep 20, 2024

I assume this is still borked. Sorry been a bad maintainer and haven't looked at this.

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

No branches or pull requests

2 participants