Merge pull request #13835 from desktop/try-alive-websocket-url-catch

Surround `api.getAliveWebSocketURL` in try-catch
This commit is contained in:
Sergio Padrino 2022-02-07 13:48:56 +01:00 committed by GitHub
commit 7015981bea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -144,7 +144,14 @@ export class AliveStore {
}
const api = API.fromAccount(account)
const webSocketUrl = await api.getAliveWebSocketURL()
let webSocketUrl = null
try {
webSocketUrl = await api.getAliveWebSocketURL()
} catch (e) {
log.error(`Could not get Alive web socket URL for '${account.login}'`, e)
return null
}
if (webSocketUrl === null) {
return null