Merge pull request #2066 from UmakanthKaspa/fix/course-creation-error-toast

fix: show error toast when course creation fails
This commit is contained in:
Jannat Patel
2026-02-10 10:48:34 +05:30
committed by GitHub

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]))
},
}
)
}