Skip to content

BAH-4789: Harden FormPrivilegeTable pagination error handling - #142

Open
anushkadubey-star wants to merge 1 commit into
masterfrom
BAH-4789-privilege-pagination-robustness
Open

anushkadubey-star wants to merge 1 commit into
masterfrom
BAH-4789-privilege-pagination-robustness

Conversation

@anushkadubey-star

@anushkadubey-star anushkadubey-star commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

#141
Improves error handling and pagination safety in FormPrivilegeTable.

Changes

  • Handle first-page and subsequent-page request failures through the existing error notification mechanism.
  • Provide a fallback error message when an error has no usable message.
  • Prevent repeated pagination links from causing infinite request loops.
  • Add regression tests for failed requests, invalid and repeated pagination links, and successful multi-page privilege loading.
  • Strengthen assertions to verify the exact privilege contents, order, and same-origin request URLs.

Note: The loading state is not rendered in this component, so resetting it is state cleanup rather than a visible spinner fix. The user-visible improvement is the error notification when privilege loading fails.

Validation

  • Karma: 451/451 tests passed.
  • ESLint: 0 errors; 75 warnings, matching the reported baseline.
  • Webpack build: passed.
  • git diff --check: passed.
  • Mutation check confirmed that the three fallback tests fail when the fallback is removed.

No changes were made to FormBuilderContainer, httpInterceptor, or existing 401/403 redirect behavior.

Show an error notification when a first or later privilege page fails,
fall back to a default message when the error has none, and stop on a
repeated next-page link. Add regression tests for these cases and assert
the exact merged privileges and same-origin request URLs.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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