From 3945675ca0a44d8c317eb88908ebdfb8bc034782 Mon Sep 17 00:00:00 2001 From: Pascal Hartig Date: Wed, 16 Feb 2022 07:58:25 -0800 Subject: [PATCH] Remove dynamic data from error Summary: Dynamic information means we can't deduplicate on the backend. Logging the serial as a warning instead. In general, I'm not convinced this is a good error to begin with as it seems expected that devices can disappear on disconnect but getting a better count should help to make that decision. Reviewed By: aigoncharov Differential Revision: D34247723 fbshipit-source-id: ace3c32d2370433dcca2debbea3a2c5d7a2ecb57 --- desktop/flipper-server-core/src/FlipperServerImpl.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/desktop/flipper-server-core/src/FlipperServerImpl.tsx b/desktop/flipper-server-core/src/FlipperServerImpl.tsx index 100a8887e..f45017cbb 100644 --- a/desktop/flipper-server-core/src/FlipperServerImpl.tsx +++ b/desktop/flipper-server-core/src/FlipperServerImpl.tsx @@ -473,7 +473,8 @@ export class FlipperServerImpl implements FlipperServer { getDevice(serial: string): ServerDevice { const device = this.devices.get(serial); if (!device) { - throw new Error('No device with serial: ' + serial); + console.warn(`No device with serial ${serial}.`); + throw new Error('No device with matching serial.'); } return device; }