Skip to content

Conversation

sameerag
Copy link
Member

PageException is currently not being handled as a fatal error by MSAL JS, but the server falls back to web if it encounters the same. This PR addresses the gap.

@Copilot Copilot AI review requested due to automatic review settings September 24, 2025 06:26
@sameerag sameerag requested a review from a team as a code owner September 24, 2025 06:26
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for handling "pageException" as a fatal native authentication error in MSAL.js, aligning the client-side behavior with server-side fallback logic. When a page exception occurs, MSAL will now treat it as a fatal error and fall back to web authentication.

Key Changes

  • Added pageException as a new native authentication error code
  • Updated fatal error detection logic to include page exceptions
  • Added comprehensive test coverage for the new error handling

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
lib/msal-browser/src/error/NativeAuthErrorCodes.ts Exports new pageException error code constant
lib/msal-browser/src/error/NativeAuthError.ts Updates isFatalNativeAuthError function to treat page exceptions as fatal
lib/msal-browser/test/error/NativeAuthError.spec.ts Adds test case to verify page exception is handled as fatal error

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