captura correcta de errores para crear asistencia
Some checks failed
build-and-deploy / filter (push) Successful in 2s
Sync to GitHub / sync (push) Failing after 1s
build-and-deploy / build (push) Successful in 12s
build-and-deploy / deploy (push) Successful in 15s

This commit is contained in:
2025-05-30 11:14:17 -06:00
parent 918a53529c
commit faa18be61d
2 changed files with 40 additions and 23 deletions

View File

@@ -188,7 +188,7 @@ const handleSubmit = async () => {
} else {
await asistenciasStore.createAsistencia(payload);
}
router.push({ name: 'AsistenciasIndex' });
router.push({ name: 'asistencias-index' });
} catch (error) {
console.error('Error saving asistencia:', error);
const errorMsg = error.response?.data?.message || error.message || 'Ocurrió un error.';