flash-firmware: drop error on fail to connect

This error is already handled elsewhere.
This commit is contained in:
David Lechner
2021-01-23 17:29:43 -06:00
parent 5d9040647b
commit 467627dc75
4 changed files with 1 additions and 6 deletions
-1
View File
@@ -14,7 +14,6 @@
}
},
"flashFirmware": {
"connectionFailed": "Could not connect to the hub. Restart the hub and try again.",
"timedOut": "The hub took too long to respond. Restart the hub and try again.",
"bleError": "There was a problem with Bluetooth.",
"disconnected": "The hub was disconnected before flashing was completed. Restart the hub and try again.",
-1
View File
@@ -10,7 +10,6 @@ export enum MessageId {
BleGattPermission = 'ble.gattPermission',
BleGattServiceNotFound = 'ble.gattServiceNotFound',
BleNoWebBluetooth = 'ble.noWebBluetooth',
FlashFirmwareConnectionFailed = 'flashFirmware.connectionFailed',
FlashFirmwareTimedOut = 'flashFirmware.timedOut',
FlashFirmwareBleError = 'flashFirmware.bleError',
FlashFirmwareDisconnected = 'flashFirmware.disconnected',
+1 -1
View File
@@ -44,7 +44,6 @@ test.each([
add('warning', 'message'),
add('error', 'message', 'url'),
didUpdate({} as ServiceWorkerRegistration),
didFailToFinish(FailToFinishReasonType.FailedToConnect),
didFailToFinish(FailToFinishReasonType.TimedOut),
didFailToFinish(
FailToFinishReasonType.BleError,
@@ -97,6 +96,7 @@ test.each([
test.each([
bleDidFailToConnect({ reason: BleDeviceFailToConnectReasonType.Canceled }),
bootloaderDidFailToConnect(BootloaderConnectionFailureReason.Canceled),
didFailToFinish(FailToFinishReasonType.FailedToConnect),
didSucceed({} as ServiceWorkerRegistration),
])('actions that should not show a notification: %o', async (action: Action) => {
const getToasts = jest.fn().mockReturnValue([]);
-3
View File
@@ -235,9 +235,6 @@ function* showFlashFirmwareError(
action: FlashFirmwareDidFailToFinishAction,
): Generator {
switch (action.reason.reason) {
case FailToFinishReasonType.FailedToConnect:
yield* showSingleton(Level.Error, MessageId.FlashFirmwareConnectionFailed);
break;
case FailToFinishReasonType.TimedOut:
yield* showSingleton(Level.Error, MessageId.FlashFirmwareTimedOut);
break;