Don't eat exceptions
Summary: if a resolved client doesn't become available, we were eating the exception. This diff changes that, as exceptions might actually occur (e.g. a timeout, indicating that for example the device didn't become available, which points out a bug in the example below). We might now over report some issues, causing regressions in our monitoring, but let's work from there. Reviewed By: timur-valiev Differential Revision: D30806511 fbshipit-source-id: 09d62bd7c41439aa452b6df501426e239559eba2
This commit is contained in:
committed by
Facebook GitHub Bot
parent
c3b2fe836d
commit
946fc56b70
@@ -166,7 +166,13 @@ class ServerRSocket extends ServerAdapter {
|
||||
clientQuery,
|
||||
clientConnection,
|
||||
);
|
||||
client.then((client) => (resolvedClient = client)).catch((_) => {});
|
||||
client
|
||||
.then((client) => {
|
||||
resolvedClient = client;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.error('Failed to resolve new client', e);
|
||||
});
|
||||
|
||||
return {
|
||||
fireAndForget: (payload: {data: string}) => {
|
||||
|
||||
@@ -109,7 +109,13 @@ class ServerWebSocketBrowser extends ServerWebSocketBase {
|
||||
extendedClientQuery,
|
||||
clientConnection,
|
||||
);
|
||||
client.then((client) => (resolvedClient = client)).catch((_) => {});
|
||||
client
|
||||
.then((client) => {
|
||||
resolvedClient = client;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.error('Failed to connect client over webSocket', e);
|
||||
});
|
||||
|
||||
clients[app] = client;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user