Skip to content

Return error when query returns too many pages#30

Open
mathukumillia wants to merge 1 commit intosift-stack:mainfrom
mathukumillia:add_excess_page_error
Open

Return error when query returns too many pages#30
mathukumillia wants to merge 1 commit intosift-stack:mainfrom
mathukumillia:add_excess_page_error

Conversation

@mathukumillia
Copy link
Copy Markdown

Pull Request

Description

Modifes the handlePaginatedRequest function to return an error when the number of pages returned exceeds the statically configured limit. Without this, the returned data is arbitrarily truncated, leading to potentially misleading data and dashboards.

Type of change

Please check the boxes that apply to this pull request.

  • [X ] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

I ran a Grafana instance locally that returned more than one page and ensured it returned an error.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • [ N/A?] I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • [ N/A] Any dependent changes have been merged and published in downstream modules

Screenshots

image

Modifes the handlePaginatedRequest function to return an error when
the number of pages returned exceeds the statically configured
limit. Without this, the returned data is arbitrarily truncated,
leading to potentially misleading data and dashboards.
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

Successfully merging this pull request may close these issues.

1 participant