Skip to content

Add a distinct MsalJsonParsingException for JSON parsing failures#933

Merged
Avery-Dunn merged 5 commits intodevfrom
avdunn/mi-exceptions
Apr 7, 2025
Merged

Add a distinct MsalJsonParsingException for JSON parsing failures#933
Avery-Dunn merged 5 commits intodevfrom
avdunn/mi-exceptions

Conversation

@Avery-Dunn
Copy link
Contributor

As explained in #907, Azure Identity used to have distinct exceptions for JSON parsing errors in MI scenarios, but MSAL did not add any when we implemented managed identity support.

This PR adds a distinct MsalJsonParsingException for JSON parsing errors in all flows, with a special message and code when thrown in MI flows. The message/code are similar to those added in MSAL.NET: AzureAD/microsoft-authentication-library-for-dotnet#5038

@Avery-Dunn Avery-Dunn requested a review from a team as a code owner April 3, 2025 23:59
neha-bhargava
neha-bhargava previously approved these changes Apr 4, 2025
Copy link
Contributor

@neha-bhargava neha-bhargava left a comment

Choose a reason for hiding this comment

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

Approved with suggestions

@Avery-Dunn Avery-Dunn merged commit bdac7ec into dev Apr 7, 2025
5 checks passed
@Avery-Dunn Avery-Dunn deleted the avdunn/mi-exceptions branch June 3, 2025 17:05
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.

3 participants