fix: show error toast when course creation fails

This commit is contained in:
UmakanthKaspa
2026-02-09 13:41:12 +00:00
parent ad6e0a3b80
commit 1d91baa9c5

View File

@@ -78,7 +78,7 @@ import { Button, Dialog, FormControl, TextEditor, toast } from 'frappe-ui'
import { Link, useOnboarding, useTelemetry } from 'frappe-ui/frappe'
import { inject, onMounted, onBeforeUnmount, ref, watch } from 'vue'
import { useRouter } from 'vue-router'
import { openSettings } from '@/utils'
import { cleanError, openSettings } from '@/utils'
import MultiSelect from '@/components/Controls/MultiSelect.vue'
import Uploader from '@/components/Controls/Uploader.vue'
@@ -125,6 +125,9 @@ const saveCourse = (close: () => void = () => {}) => {
})
}
},
onError(err: any) {
toast.error(cleanError(err.messages?.[0]))
},
}
)
}