diff --git a/frontend/app/pages/account/activation/[token].vue b/frontend/app/pages/account/activation/[token].vue index 45edf0d..f083598 100644 --- a/frontend/app/pages/account/activation/[token].vue +++ b/frontend/app/pages/account/activation/[token].vue @@ -43,7 +43,7 @@ async function handleLogin() { success.value = true; } catch (e) { - if (e instanceof FetchError && e.response?.status === 422) { + if (e instanceof FetchError) { error.value = e.response?._data.message; } } finally { diff --git a/frontend/app/pages/dashboard/admin/internships/edit/[id].vue b/frontend/app/pages/dashboard/admin/internships/edit/[id].vue index 6b9c4cc..f74d4e2 100644 --- a/frontend/app/pages/dashboard/admin/internships/edit/[id].vue +++ b/frontend/app/pages/dashboard/admin/internships/edit/[id].vue @@ -33,7 +33,7 @@ async function handleUpdateOfBasicInfo(internship: NewInternship) { navigateTo("/dashboard/admin/internships"); } catch (e) { - if (e instanceof FetchError && (e.response?.status === 422 || e.response?.status === 400)) { + if (e instanceof FetchError) { action_error.value = e.response?._data.message; } } finally { diff --git a/frontend/app/pages/dashboard/admin/students/edit/[id].vue b/frontend/app/pages/dashboard/admin/students/edit/[id].vue index 72c3bb7..2a668a6 100644 --- a/frontend/app/pages/dashboard/admin/students/edit/[id].vue +++ b/frontend/app/pages/dashboard/admin/students/edit/[id].vue @@ -64,7 +64,6 @@ async function saveChanges() { navigateTo("/dashboard/admin/students"); } catch (e) { if (e instanceof FetchError) { - console.error('Error saving student:', e.response?._data.message); alert('Chyba:\n' + e.response?._data.message); } } finally { @@ -111,8 +110,6 @@ const deleteStudent = async () => { } catch (e) { if (e instanceof FetchError) { deleteError.value = e.response?._data?.message || 'Chyba pri mazaní študenta.'; - } else { - deleteError.value = 'Neznáma chyba pri mazaní študenta.'; } } finally { deleteLoading.value = false; diff --git a/frontend/app/pages/dashboard/student/internship/create.vue b/frontend/app/pages/dashboard/student/internship/create.vue index acd2b46..cf349da 100644 --- a/frontend/app/pages/dashboard/student/internship/create.vue +++ b/frontend/app/pages/dashboard/student/internship/create.vue @@ -1,5 +1,6 @@