microsoft-authentication-library-for-java icon indicating copy to clipboard operation
microsoft-authentication-library-for-java copied to clipboard

Add a distinct MsalJsonParsingException for JSON parsing failures

Open Avery-Dunn opened this issue 7 months ago • 0 comments

As explained in https://github.com/AzureAD/microsoft-authentication-library-for-java/issues/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: https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/pull/5038

Avery-Dunn avatar Apr 03 '25 23:04 Avery-Dunn