Skip to content

Commit 23ffa1a

Browse files
Merge master into feature/emr
2 parents ab705c6 + 0b169a8 commit 23ffa1a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/core/src/shared/lsp/utils/platform.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export async function validateNodeExe(nodePath: string[], lsp: string, args: str
4040
if (!ok) {
4141
const msg = `failed to run basic "node -e" test (exitcode=${r.exitCode}): ${proc.toString(false, true)}`
4242
logger.error(msg)
43-
throw new ToolkitError(`amazonqLsp: ${msg}`)
43+
throw new ToolkitError(`amazonqLsp: ${msg}`, { code: 'FailedToRunNode' })
4444
}
4545

4646
// Check that we can start `node …/lsp.js --stdio …`.
@@ -68,7 +68,8 @@ export async function validateNodeExe(nodePath: string[], lsp: string, args: str
6868
})
6969
if (!ok2 || selfExit) {
7070
throw new ToolkitError(
71-
`amazonqLsp: failed to run (exitcode=${lspProc.exitCode()}): ${lspProc.toString(false, true)}`
71+
`amazonqLsp: failed to run (exitcode=${lspProc.exitCode()}): ${lspProc.toString(false, true)}`,
72+
{ code: 'FailedToStartLanguageServer' }
7273
)
7374
}
7475
} finally {

0 commit comments

Comments
 (0)