MCPcopy Create free account
hub / github.com/desktop/desktop / getAliveWebSocketURL

Method getAliveWebSocketURL

app/src/lib/api.ts:885–897  ·  view source on GitHub ↗

* Retrieves the URL for the Alive websocket. * * @returns The websocket URL if the request succeeded, null if the request * failed with 404, otherwise it will throw an error. * * This behavior is expected by the AliveSession class constructor, to prevent * it from hitting the endpo

()

Source from the content-addressed store, hash-verified

883 * it from hitting the endpoint many times if it's disabled.
884 */
885 public async getAliveWebSocketURL(): Promise<string | null> {
886 try {
887 const res = await this.ghRequest('GET', '/alive_internal/websocket-url')
888 if (res.status === HttpStatusCode.NotFound) {
889 return null
890 }
891 const websocket = await parsedResponse<IAPIAliveWebSocket>(res)
892 return websocket.url
893 } catch (e) {
894 log.warn(`Alive web socket request failed: ${e}`)
895 throw e
896 }
897 }
898
899 /**
900 * Fetch an issue comment (i.e. a comment on an issue or pull request).

Callers 1

Calls 2

ghRequestMethod · 0.95
warnMethod · 0.80

Tested by

no test coverage detected