@@ -55,7 +55,8 @@ private static void Main()
5555 new string [ ] { Constants . DefaultScope } ) ;
5656
5757 // Start watching mail folders
58- try {
58+ try
59+ {
5960 Task . Run ( ( ) => WatchMailFolders ( appConfiguration . PullIntervalSec ) ) . Wait ( ) ;
6061 }
6162 catch ( MsalServiceException mse )
@@ -130,16 +131,21 @@ public static async Task WatchMailFolders(int pullIntervalSec)
130131 }
131132 }
132133
134+ /// <summary>
135+ /// Method for handling exceptions thrown by the MSAL library.
136+ /// </summary>
137+ /// <param name="mse">Intance of an excpetion of the type <see cref="MsalServiceException"/>> </param>
138+ /// <returns></returns>
133139 private static void ProcessMsalException ( MsalServiceException mse )
134140 {
135141 switch ( mse . ErrorCode )
136142 {
137143 case MsalServiceException . InvalidAuthority :
138- // What happens: When the library attempts to discover the authority and get the endpoints it
139- // needs to acquire a token, it got an un-authorize HTTP code or an unexpected response
140- // Remediation:
141- // Check that the authority configured for the application, or passed on some overrides
142- // of token acquisition tokens supporting authority override is correct
144+ // What happens: When the library attempts to discover the authority and get the endpoints it
145+ // needs to acquire a token, it got an un-authorize HTTP code or an unexpected response
146+ // Remediation:
147+ // Check that the authority configured for the application, or passed on some overrides
148+ // of token acquisition tokens supporting authority override is correct
143149 case "unauthorized_client" :
144150 // For instance: AADSTS700016: Application with identifier '{clientId}' was not found in the directory '{domain}'.
145151 // This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant.
0 commit comments