Skip to content

Pagination code no longer seems to work. #41

Open
@ArcticSnowman

Description

@ArcticSnowman

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions