Skip to content

Commit 4dcee33

Browse files
committed
sam: link to troubleshooting on failure
1 parent e3c16f2 commit 4dcee33

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/shared/constants.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ export const samInstallUrl = vscode.Uri.parse(
2121
export const samUpgradeUrl = vscode.Uri.parse(
2222
'https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/manage-sam-cli-versions.html#manage-sam-cli-versions-upgrade'
2323
)
24+
export const samTroubleshootingUrl = vscode.Uri.parse(
25+
'https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-cli-troubleshooting.html'
26+
)
2427
export const githubUrl: string = 'https://github.com/aws/aws-toolkit-vscode'
2528
export const githubCreateIssueUrl = `${githubUrl}/issues/new/choose`
2629
export const documentationUrl: string = isCloud9()

src/shared/sam/debugger/awsSamDebugger.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ import { Runtime, telemetry } from '../../telemetry/telemetry'
6464
import { ErrorInformation, isUserCancelledError, ToolkitError } from '../../errors'
6565
import { openLaunchJsonFile } from './commands/addSamDebugConfiguration'
6666
import { Logging } from '../../logger/commands'
67-
import { credentialHelpUrl } from '../../constants'
67+
import { credentialHelpUrl, samTroubleshootingUrl } from '../../constants'
6868
import { Auth } from '../../../auth/auth'
6969
import { openUrl } from '../../utilities/vsCodeUtils'
7070

@@ -81,6 +81,10 @@ class SamLaunchRequestError extends ToolkitError.named('SamLaunchRequestError')
8181
public constructor(message: string, info?: ErrorInformation & { readonly extraButtons?: NotificationButton[] }) {
8282
super(message, info)
8383
this.buttons = info?.extraButtons ?? [
84+
{
85+
label: localize('AWS.generic.message.troubleshooting', 'Troubleshooting'),
86+
onClick: () => openUrl(samTroubleshootingUrl),
87+
},
8488
{
8589
label: localize('AWS.generic.message.openConfig', 'Open Launch Config'),
8690
onClick: openLaunchJsonFile,

0 commit comments

Comments
 (0)