@@ -4,6 +4,7 @@ import * as vscode from 'vscode'
4
4
import { COMMANDS } from '../editor/commands'
5
5
import languageMap from '../editor/languageMap'
6
6
import * as git from '../services/git'
7
+ import onError from '../services/sentry/onError'
7
8
8
9
interface TutorialConfigParams {
9
10
config : T . TutorialConfig
@@ -13,13 +14,14 @@ interface TutorialConfigParams {
13
14
14
15
const tutorialConfig = async (
15
16
{ config, alreadyConfigured } : TutorialConfigParams ,
16
- onError : ( msg : T . ErrorMessage ) => void ,
17
+ handleError : ( msg : T . ErrorMessage ) => void ,
17
18
) => {
18
19
if ( ! alreadyConfigured ) {
19
20
// setup git, add remote
20
21
await git . initIfNotExists ( ) . catch ( error => {
22
+ onError ( new Error ( 'Git not found' ) )
21
23
// failed to setup git
22
- onError ( {
24
+ handleError ( {
23
25
title : error . message ,
24
26
description :
25
27
'Be sure you install Git. See the docs for help https://git-scm.com/book/en/v2/Getting-Started-Installing-Git' ,
@@ -28,7 +30,8 @@ const tutorialConfig = async (
28
30
29
31
// TODO if remote not already set
30
32
await git . setupRemote ( config . repo . uri ) . catch ( error => {
31
- onError ( { title : error . message , description : 'Remove your current Git project and restarting' } )
33
+ onError ( error )
34
+ handleError ( { title : error . message , description : 'Remove your current Git project and restarting' } )
32
35
} )
33
36
}
34
37
0 commit comments