Surround api.getAliveWebSocketURL in try-catch

This commit is contained in:
Sergio Padrino 2022-02-07 10:32:51 +01:00
parent 0b9836b113
commit 5f4f299791

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