(start, end, { signal } = {})
| 293 | // Pass `signal` from an AbortController on per-keystroke calls so an |
| 294 | // out-of-order response cannot overwrite newer state. |
| 295 | static async getChannelsInRange(start, end, { signal } = {}) { |
| 296 | try { |
| 297 | const params = new URLSearchParams({ start: String(start) }); |
| 298 | if (end !== undefined && end !== null && end !== '') { |
| 299 | params.set('end', String(end)); |
| 300 | } |
| 301 | const url = `${host}/api/channels/channels/numbers-in-range/?${params.toString()}`; |
| 302 | return await request(url, { signal }); |
| 303 | } catch (e) { |
| 304 | if (e?.name === 'AbortError') { |
| 305 | throw e; |
| 306 | } |
| 307 | // Silent failure is correct here: the warning is purely advisory and |
| 308 | // should not block the user from saving when the server is flaky. |
| 309 | return { occupants: [] }; |
| 310 | } |
| 311 | } |
| 312 | |
| 313 | // Server-side regex preview for a group's streams. Returns find_matches, |
| 314 | // filter_matches, and exclude_matches plus accurate counts across the |
no test coverage detected