mirror of
https://github.com/infinilabs/coco-app.git
synced 2025-12-14 18:47:42 +01:00
chore: show error msg (not err code) when installing exts via deeplink/store fails (#1007)
* chore: show error msg (not err code) when installing exts via deeplink fails When installing extensions via deeplink fails, previous implementation showed the raw error code returned from the backend interfaces, which is not user-friendly. We now call installExtensionError() to interrupt the error code to get a human-readable error message, then show it to the users. * fix: correct install extension error when installing via store
This commit is contained in:
@@ -19,6 +19,8 @@ Information about release notes of Coco App is provided here.
|
||||
|
||||
### ✈️ Improvements
|
||||
|
||||
- chore: show error msg (not err code) when installing exts via deeplink fails #1007
|
||||
|
||||
## 0.9.1 (2025-12-05)
|
||||
|
||||
### ❌ Breaking changes
|
||||
|
||||
@@ -244,7 +244,7 @@ const ExtensionStore = ({ extensionId }: { extensionId?: string }) => {
|
||||
"info"
|
||||
);
|
||||
} catch (error) {
|
||||
installExtensionError(String(error));
|
||||
installExtensionError(error);
|
||||
} finally {
|
||||
const { installingExtensions } = useSearchStore.getState();
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import platformAdapter from "@/utils/platformAdapter";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { MAIN_WINDOW_LABEL, SETTINGS_WINDOW_LABEL } from "@/constants";
|
||||
import { useAsyncEffect, useEventListener } from "ahooks";
|
||||
import { installExtensionError } from "@/utils";
|
||||
|
||||
export interface DeepLinkHandler {
|
||||
pattern: string;
|
||||
@@ -78,7 +79,7 @@ export function useDeepLinkManager() {
|
||||
addError(t("deepLink.extensionInstallSuccessfully"), "info");
|
||||
console.log("Extension installed successfully:", extensionId);
|
||||
} catch (error) {
|
||||
addError(String(error));
|
||||
installExtensionError(error)
|
||||
}
|
||||
}, []);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user