File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
msal/src/main/java/com/microsoft/identity/client Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1647,7 +1647,7 @@ private MsalException baseExceptionToMsalException(@NonNull final BaseException
16471647 );
16481648 }
16491649
1650- return new MsalClientException ( exception . getErrorCode (), exception . getMessage () );
1650+ return MsalExceptionAdapter . msalExceptionFromBaseException ( exception );
16511651 }
16521652
16531653 /**
Original file line number Diff line number Diff line change 4242public class MsalExceptionAdapter {
4343
4444 public static MsalException msalExceptionFromBaseException (final BaseException e ) {
45+ final MsalException result = msalExceptionFromBaseExceptionInternal (e );
46+ result .setSubErrorCode (e .getSubErrorCode ());
47+ return result ;
48+ }
49+
50+ private static MsalException msalExceptionFromBaseExceptionInternal (final BaseException e ) {
4551 if (e instanceof MsalException ) {
4652 return (MsalException ) e ;
4753 }
@@ -69,7 +75,7 @@ public static MsalException msalExceptionFromBaseException(final BaseException e
6975 final UiRequiredException uiRequiredException = ((UiRequiredException ) e );
7076 return new MsalUiRequiredException (
7177 uiRequiredException .getErrorCode (),
72- uiRequiredException .getOAuthSubErrorCode (),
78+ uiRequiredException .getSubErrorCode (),
7379 uiRequiredException .getMessage ()
7480 );
7581 }
You can’t perform that action at this time.
0 commit comments