Skip to content

Commit 02cfc5b

Browse files
Merge master into feature/logs
2 parents ce35dd0 + 0b169a8 commit 02cfc5b

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
@@ -42,7 +42,7 @@ export async function validateNodeExe(nodePath: string[], lsp: string, args: str
4242
if (!ok) {
4343
const msg = `failed to run basic "node -e" test (exitcode=${r.exitCode}): ${proc.toString(false, true)}`
4444
logger.error(msg)
45-
throw new ToolkitError(`amazonqLsp: ${msg}`)
45+
throw new ToolkitError(`amazonqLsp: ${msg}`, { code: 'FailedToRunNode' })
4646
}
4747
logger.debug('node process is OK')
4848

@@ -72,7 +72,8 @@ export async function validateNodeExe(nodePath: string[], lsp: string, args: str
7272
})
7373
if (!ok2 || selfExit) {
7474
throw new ToolkitError(
75-
`amazonqLsp: failed to run (exitcode=${lspProc.exitCode()}): ${lspProc.toString(false, true)}`
75+
`amazonqLsp: failed to run (exitcode=${lspProc.exitCode()}): ${lspProc.toString(false, true)}`,
76+
{ code: 'FailedToStartLanguageServer' }
7677
)
7778
}
7879
} finally {

0 commit comments

Comments
 (0)