Skip to content

Commit 6ea7ca2

Browse files
authored
Merge pull request #1018
* fix(29929): remove duplicated error roast * fix(29929): fix title of error toast * fix(29929): fix uncaught promise
1 parent 2fb3e00 commit 6ea7ca2

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

hivemq-edge-frontend/src/extensions/datahub/components/toolbar/ToolbarPublish.tsx

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -85,18 +85,7 @@ export const ToolbarPublish: FC = () => {
8585
id: 'publish-success',
8686
})
8787
})
88-
.catch((error) => {
89-
let message
90-
if (error instanceof Error) message = error.message
91-
else message = String(error)
92-
toast({
93-
...dataHubToastOption,
94-
title: t('publish.error.title', { source: type || selectedNode?.type }),
95-
description: message,
96-
status: 'error',
97-
id: 'publish-error',
98-
})
99-
})
88+
.catch(() => {})
10089
return promise
10190
}
10291

@@ -197,10 +186,10 @@ export const ToolbarPublish: FC = () => {
197186
else message = String(error)
198187
return toast({
199188
...dataHubToastOption,
200-
title: t('publish.error.title', { source: DataHubNodeType.DATA_POLICY }),
189+
title: t('publish.error.title', { source: selectedNode?.type }),
201190
description: message.toString(),
202191
status: 'error',
203-
id: 'publish-runtime-error',
192+
id: 'publish-error',
204193
})
205194
})
206195
}

0 commit comments

Comments
 (0)