MCPcopy Create free account
hub / github.com/dwgx/WindsurfAPI / acquireLsUseOrThrow

Function acquireLsUseOrThrow

src/client.js:35–45  ·  view source on GitHub ↗
(port)

Source from the content-addressed store, hash-verified

33const LS_SERVICE = '/exa.language_server_pb.LanguageServerService';
34
35function acquireLsUseOrThrow(port) {
36 const entry = beginLsUse(port);
37 if (entry) return entry;
38 if (!getLsEntryByPort(port)) return null;
39 const err = new Error('Language server is busy with maintenance; try another account or retry shortly');
40 err.code = 'LS_MAINTENANCE_BUSY';
41 err.type = 'ls_maintenance_busy';
42 err.status = 503;
43 err.isResourceExhausted = true;
44 return (() => { throw err; })();
45}
46
47export function isCascadeTransportError(err) {
48 const msg = String(err?.message || err || '');

Callers 3

rawGetChatMessageMethod · 0.85
cascadeChatMethod · 0.85
getUserStatusMethod · 0.85

Calls 2

beginLsUseFunction · 0.90
getLsEntryByPortFunction · 0.90

Tested by

no test coverage detected