Skip to content

Commit 2992fcb

Browse files
committed
refactor: change error codes
1 parent 2ccac57 commit 2992fcb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 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}`, { code: 'InvalidNode' })
43+
throw new ToolkitError(`amazonqLsp: ${msg}`, { code: 'FailedToRunNode' })
4444
}
4545

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

0 commit comments

Comments
 (0)