Cleaned up most vanilla try catches

This commit is contained in:
Alexis
2025-04-18 17:11:45 +02:00
parent 9b4556245e
commit 00224417be
14 changed files with 163 additions and 177 deletions

View File

@@ -29,17 +29,16 @@ async function handleSubmit() {
isLoading.value = true
try {
await submitSkeleton()
const { error } = await tryCatch(submitSkeleton())
emit("event-created")
} catch (err) {
if (err instanceof Error) {
formErrors.message = err.message
}
} finally {
if (error) {
formErrors.message = error.message
isLoading.value = false
return
}
emit("event-created")
isLoading.value = false
}
/**