@@ -4,6 +4,7 @@ import * as vscode from 'vscode'
44import { COMMANDS } from '../editor/commands'
55import languageMap from '../editor/languageMap'
66import * as git from '../services/git'
7+ import onError from '../services/sentry/onError'
78
89interface TutorialConfigParams {
910 config : T . TutorialConfig
@@ -13,13 +14,14 @@ interface TutorialConfigParams {
1314
1415const tutorialConfig = async (
1516 { config, alreadyConfigured } : TutorialConfigParams ,
16- onError : ( msg : T . ErrorMessage ) => void ,
17+ handleError : ( msg : T . ErrorMessage ) => void ,
1718) => {
1819 if ( ! alreadyConfigured ) {
1920 // setup git, add remote
2021 await git . initIfNotExists ( ) . catch ( error => {
22+ onError ( new Error ( 'Git not found' ) )
2123 // failed to setup git
22- onError ( {
24+ handleError ( {
2325 title : error . message ,
2426 description :
2527 '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 (
2830
2931 // TODO if remote not already set
3032 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' } )
3235 } )
3336 }
3437
0 commit comments