File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -545,9 +545,18 @@ public static async Task RequireGitAuthenticationAsync()
545545 client . DefaultRequestHeaders . Add ( "Accept" , "application/json" ) ;
546546 client . DefaultRequestHeaders . Add ( "User-Agent" , "Files App" ) ;
547547
548- var codeResponse = await client . PostAsync (
549- $ "https://github.com/login/device/code?client_id={ _clientId } &scope=repo",
550- new StringContent ( "" ) ) ;
548+ HttpResponseMessage codeResponse ;
549+ try
550+ {
551+ codeResponse = await client . PostAsync (
552+ $ "https://github.com/login/device/code?client_id={ _clientId } &scope=repo",
553+ new StringContent ( "" ) ) ;
554+ }
555+ catch
556+ {
557+ await DynamicDialogFactory . GetFor_GitHubConnectionError ( ) . TryShowAsync ( ) ;
558+ return ;
559+ }
551560
552561 if ( ! codeResponse . IsSuccessStatusCode )
553562 {
You can’t perform that action at this time.
0 commit comments