mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-20 02:08:57 +00:00
Notify RingRTC of Failed HTTP requests
This commit is contained in:
committed by
Josh Perez
parent
b44cabe6f9
commit
a0baa3e03f
@@ -1219,8 +1219,15 @@ export class CallingClass {
|
||||
body
|
||||
);
|
||||
} catch (err) {
|
||||
if (err.code !== -1) {
|
||||
// WebAPI treats certain response codes as errors, but RingRTC still needs to
|
||||
// see them. It does not currently look at the response body, so we're giving
|
||||
// it an empty one.
|
||||
RingRTC.receivedHttpResponse(requestId, err.code, new ArrayBuffer(0));
|
||||
} else {
|
||||
window.log.error('handleSendHttpRequest: fetch failed with error', err);
|
||||
RingRTC.httpRequestFailed(requestId, String(err));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user