Skip to content

Commit ee43a12

Browse files
Akos Kittakittaakos
authored andcommitted
fix: show no errors if users cancel lib install
Throwing and catching a `UserAbortError` is part of the natural flow. Closes #2063 Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
1 parent 31deeeb commit ee43a12

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

arduino-ide-extension/src/browser/widgets/component-list/filterable-list-container.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
} from '../../../common/protocol/installable';
1414
import { ArduinoComponent } from '../../../common/protocol/arduino-component';
1515
import { SearchBar } from './search-bar';
16-
import { ListWidget } from './list-widget';
16+
import { ListWidget, UserAbortError } from './list-widget';
1717
import { ComponentList } from './component-list';
1818
import { ListItemRenderer } from './list-item-renderer';
1919
import {
@@ -148,6 +148,11 @@ export class FilterableListContainer<
148148
try {
149149
await install({ item, progressId, version });
150150
} catch (err) {
151+
if (err instanceof UserAbortError) {
152+
// Do not toast an error message on user abort.
153+
// https://github.com/arduino/arduino-ide/issues/2063
154+
return;
155+
}
151156
const message = LibraryPackage.is(item) // TODO: this dispatch does not belong here
152157
? libraryInstallFailed(name, version)
153158
: platformInstallFailed(name, version);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy