Skip to content

Commit 14e66f1

Browse files
authored
Merge pull request #556 from chrisjohn2306/exception_handling_scenarios
Updating Exception Handling Scenarios
2 parents e1fb6a3 + 0bbade7 commit 14e66f1

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/components/Toolbar.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ async function showGitOperationDialog(
4848
});
4949
let retry = false;
5050
while (!result.button.accept) {
51-
retry = true;
5251
const credentials = await showDialog({
5352
title: 'Git credentials required',
5453
body: new GitCredentialsForm(
@@ -57,14 +56,17 @@ async function showGitOperationDialog(
5756
),
5857
buttons: [Dialog.cancelButton(), Dialog.okButton({ label: 'OK' })]
5958
});
59+
6060
if (!credentials.button.accept) {
6161
break;
6262
}
63+
6364
result = await showDialog({
6465
title: title,
6566
body: new GitPullPushDialog(model, operation, credentials.value),
6667
buttons: [Dialog.okButton({ label: 'DISMISS' })]
6768
});
69+
retry = true;
6870
}
6971
}
7072

src/widgets/gitClone.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ async function makeApiCall(
8484
]);
8585
break;
8686
}
87+
} else {
88+
showErrorMessage('Clone failed', response.message, [
89+
Dialog.warnButton({ label: 'DISMISS' })
90+
]);
91+
break;
8792
}
8893
}
8994
} catch (error) {

0 commit comments

Comments
 (0)