diff --git a/src/annotations/components/annotationForm/AnnotationForm.tsx b/src/annotations/components/annotationForm/AnnotationForm.tsx index 2b6fe207c6..ae1df2de08 100644 --- a/src/annotations/components/annotationForm/AnnotationForm.tsx +++ b/src/annotations/components/annotationForm/AnnotationForm.tsx @@ -140,7 +140,7 @@ export const AnnotationForm: FC = (props: Props) => { } try { - dispatch(deleteAnnotations(editedAnnotation)) + await dispatch(deleteAnnotations(editedAnnotation)) event(`annotations.delete_annotation.success`, { prefix: props.eventPrefix, }) diff --git a/src/flows/context/flow.list.tsx b/src/flows/context/flow.list.tsx index 802334f7d3..f9b54f4e7a 100644 --- a/src/flows/context/flow.list.tsx +++ b/src/flows/context/flow.list.tsx @@ -34,6 +34,7 @@ import { } from 'src/shared/copy/notifications' import {setCloneName} from 'src/utils/naming' import {CLOUD} from 'src/shared/constants' +import {getErrorMessage} from 'src/utils/api' export interface FlowListContextType extends FlowList { add: (flow?: Flow) => Promise @@ -238,8 +239,8 @@ export const FlowListProvider: FC = ({children}) => { return flow.id }) - .catch(() => { - dispatch(notify(notebookCreateFail())) + .catch(err => { + dispatch(notify(notebookCreateFail(getErrorMessage(err)))) }) } diff --git a/src/shared/copy/notifications/categories/notebooks.ts b/src/shared/copy/notifications/categories/notebooks.ts index c98b8c684b..45389a97b4 100644 --- a/src/shared/copy/notifications/categories/notebooks.ts +++ b/src/shared/copy/notifications/categories/notebooks.ts @@ -21,9 +21,9 @@ export const panelCopyLinkFail = (): Notification => ({ message: `Failed to copy the panel link`, }) -export const notebookCreateFail = (): Notification => ({ +export const notebookCreateFail = (error: string): Notification => ({ ...defaultErrorNotification, - message: `Failed to create Notebook, please try again.`, + message: `Failed to create Notebook, please try again: ${error}`, }) export const notebookUpdateFail = (): Notification => ({