diff --git a/.gitignore b/.gitignore index 367091dac..fc27880b0 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,5 @@ docs/ storybook-static +# IDE +.idea diff --git a/apps/web/src/components/Menu/ErrorLogsMenu/ErrorLogsMenu.tsx b/apps/web/src/components/Menu/ErrorLogsMenu/ErrorLogsMenu.tsx index 9bd816a3f..e7c508ec3 100644 --- a/apps/web/src/components/Menu/ErrorLogsMenu/ErrorLogsMenu.tsx +++ b/apps/web/src/components/Menu/ErrorLogsMenu/ErrorLogsMenu.tsx @@ -4,6 +4,7 @@ import { errorsActions, useAppDispatch, useAppSelector } from "@umami/state"; import { useColor } from "../../../styles/useColor"; import { EmptyMessage } from "../../EmptyMessage"; import { DrawerContentWrapper } from "../DrawerContentWrapper"; +import { handleTezError } from "@umami/utils"; export const ErrorLogsMenu = () => { const color = useColor(); @@ -60,7 +61,7 @@ export const ErrorLogsMenu = () => { {errorLog.technicalDetails && ( - {errorLog.technicalDetails} + {handleTezError({name: "unknown", message: errorLog.technicalDetails})} )} diff --git a/packages/utils/src/ErrorContext.ts b/packages/utils/src/ErrorContext.ts index ad5d79786..590164ee6 100644 --- a/packages/utils/src/ErrorContext.ts +++ b/packages/utils/src/ErrorContext.ts @@ -21,7 +21,10 @@ export const handleTezError = (err: Error): string | undefined => { } else if (err.message.includes("staking_to_delegate_that_refuses_external_staking")) { return "The baker you are trying to stake to does not accept external staking."; } else if (err.message.includes("empty_implicit_delegated_contract")) { - return "Emptying an implicit delegated account is not allowed."; + return "Emptying an implicit delegated account is not allowed. End delegation before trying again."; + } + else { + return "Unknown error. Contact support team for more information."; } };