better error lsp server (#1850)
Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
@ -33,10 +33,12 @@ export default class Server {
|
|||||||
this.#fromServer,
|
this.#fromServer,
|
||||||
fileSystemManager
|
fileSystemManager
|
||||||
)
|
)
|
||||||
|
if (!token || token === '') {
|
||||||
|
throw new Error(
|
||||||
|
type_ + ': auth token is required for lsp server to start'
|
||||||
|
)
|
||||||
|
}
|
||||||
if (type_ === 'copilot') {
|
if (type_ === 'copilot') {
|
||||||
if (!token || token === '') {
|
|
||||||
throw new Error('auth token is required for copilot')
|
|
||||||
}
|
|
||||||
await copilotLspRun(config, token)
|
await copilotLspRun(config, token)
|
||||||
} else if (type_ === 'kcl') {
|
} else if (type_ === 'kcl') {
|
||||||
await kclLspRun(config, token || '')
|
await kclLspRun(config, token || '')
|
||||||
|
Reference in New Issue
Block a user