Fix: unhandled exception Gitlab::Git::InvalidPageToken

What does this MR do and why?

Contributes to #565706 (closed)

Problem

The application returns a 500 error when user provides an invalid page_token on protected branches page.

Solution

Handle Gitlab::Git::InvalidPageToken exception and display a warning message to the user.

References

GRPC::InvalidArgument: invalid page token error... (#565706 - closed)

Screenshots or screen recordings

Before After
Screenshot_2025-08-27_at_10.23.50 Screenshot_2025-08-27_at_10.23.20

How to set up and validate locally

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading