fix: Only show one toast when extensions fail to add/activate/etc (#1963)
This commit is contained in:
@@ -58,11 +58,7 @@ export async function extensionApiCall(
|
|||||||
if (data.error) {
|
if (data.error) {
|
||||||
const errorMessage = `Error ${action.type} extension: ${data.message || 'Unknown error'}`;
|
const errorMessage = `Error ${action.type} extension: ${data.message || 'Unknown error'}`;
|
||||||
toastService.dismiss(toastId);
|
toastService.dismiss(toastId);
|
||||||
toastService.error({
|
// Rely on the global error catch to show the copyable error toast here
|
||||||
title: extensionName,
|
|
||||||
msg: errorMessage,
|
|
||||||
traceback: data.message || 'Unknown error',
|
|
||||||
});
|
|
||||||
throw new Error(errorMessage);
|
throw new Error(errorMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user