Handle libsignal websocket connect() errors

This commit is contained in:
Jordan Rose 2024-10-03 18:00:43 -07:00 committed by GitHub
parent 5e767d45a2
commit 7d25988888
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 22 additions and 11 deletions

View file

@ -1,13 +1,10 @@
// Copyright 2020 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import * as log from '../logging/log';
import type { HTTPError } from './Errors';
export async function handleStatusCode(status: number): Promise<void> {
if (status === 499) {
log.error('Got 499 from Signal Server. Build is expired.');
await window.storage.put('remoteBuildExpiration', Date.now());
window.Whisper.events.trigger('httpResponse499');
}
}