Skip to content

Commit

Permalink
better error lsp server (#1850)
Browse files Browse the repository at this point in the history
Signed-off-by: Jess Frazelle <[email protected]>
  • Loading branch information
jessfraz committed Mar 21, 2024
1 parent 2d39fd3 commit e773e93
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/editor/plugins/lsp/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@ export default class Server {
this.#fromServer,
fileSystemManager
)
if (!token || token === '') {
throw new Error(
type_ + ': auth token is required for lsp server to start'
)
}
if (type_ === 'copilot') {
if (!token || token === '') {
throw new Error('auth token is required for copilot')
}
await copilotLspRun(config, token)
} else if (type_ === 'kcl') {
await kclLspRun(config, token || '')
Expand Down

0 comments on commit e773e93

Please sign in to comment.