Skip to content

--limit is silently capped at 100 by the Sentry API #268

@betegon

Description

@betegon

Problem

When a user passes --limit 5000 to sentry issue list, the CLI forwards the value directly to the Sentry API, which silently clamps it to 100. The user gets exactly 100 results with no indication their limit was ignored.

The user expected ~500 results (visible in the Sentry UI), got 100, and had no way to tell what happened or how to get the rest.

Current behavior

  • In non-org-all modes: --limit is passed as the limit query parameter to listAnOrganization_sIssues. The API caps it at 100 server-side. No warning.
  • In org-all mode: --limit is passed as per_page. Same API cap applies. But at least --cursor last is available for manual pagination.

Ideas

  • Auto-paginate behind the scenes up to the requested limit (e.g., if user asks for 500, make 5 API calls transparently)
  • Cap auto-pagination at some reasonable ceiling (e.g., 1000) and tell the user to use --cursor with org/ mode for larger result sets
  • Warn when the API returns exactly per_page results and the user asked for more — "Showing 100 of potentially more results. Use sentry issue list org/ with --cursor last for pagination."
  • Clarify whether --limit means "total results I want" vs "page size" — right now it's ambiguous depending on the mode

Context

Ref: user report — sentry issue list javascript --query "Gen AI cost data missing" --limit 5000 returned exactly 100 results out of ~500 known matches.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions