microsoft-authentication-library-for-java
microsoft-authentication-library-for-java copied to clipboard
Add a distinct MsalJsonParsingException for JSON parsing failures
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