Skip to content

Commit

Permalink
fix: add error handler on failing to send analytic for autofix applied
Browse files Browse the repository at this point in the history
  • Loading branch information
acke committed Oct 15, 2024
1 parent 6be448e commit 28fb57f
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,11 @@ export class CodeSuggestionWebviewProvider
this.highlightAddedCode(filePath, patch);
this.setupCloseOnSave(filePath);

await vscode.commands.executeCommand(SNYK_CODE_SUBMIT_FIX_FEEDBACK, fixId, 'FIX_APPLIED');

try {
await vscode.commands.executeCommand(SNYK_CODE_SUBMIT_FIX_FEEDBACK, fixId, 'FIX_APPLIED');
} catch (e) {

Check failure on line 311 in src/snyk/snykCode/views/suggestion/codeSuggestionWebviewProvider.ts

View workflow job for this annotation

GitHub Actions / Build and Test (ubuntu-latest)

Replace `··throw·new·Error('Error·in·applyGitDiff·for·autofix')` with `throw·new·Error('Error·in·applyGitDiff·for·autofix');`

Check failure on line 311 in src/snyk/snykCode/views/suggestion/codeSuggestionWebviewProvider.ts

View workflow job for this annotation

GitHub Actions / Build and Test (macos-latest)

Replace `··throw·new·Error('Error·in·applyGitDiff·for·autofix')` with `throw·new·Error('Error·in·applyGitDiff·for·autofix');`
throw new Error('Error in applyGitDiff for autofix')
}
break;
}

Expand Down

0 comments on commit 28fb57f

Please sign in to comment.