(port)
| 33 | const LS_SERVICE = '/exa.language_server_pb.LanguageServerService'; |
| 34 | |
| 35 | function 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 | |
| 47 | export function isCascadeTransportError(err) { |
| 48 | const msg = String(err?.message || err || ''); |
no test coverage detected