Skip to content

Commit

Permalink
chore: log errors when creating with custom message #407
Browse files Browse the repository at this point in the history
  • Loading branch information
bsilkyn committed May 21, 2024
1 parent 71271f5 commit 54305f3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion frontend/src/composables/services/course.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ export function useCourses(): CoursesState {
t('toasts.messages.success'),
t('toasts.messages.courses.create.success', [course.value?.name]),
);
} catch {}
} catch (e) {
console.log(e);
}
}

async function updateCourse(courseData: Course): Promise<void> {
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/composables/services/project.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ export function useProject(): ProjectState {
t('toasts.messages.success'),
t('toasts.messages.projects.create.success', [project.value?.name]),
);
} catch {}
} catch (e) {
console.log(e);
}
}

async function updateProject(projectData: Project): Promise<void> {
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/composables/services/submission.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ export function useSubmission(): SubmissionState {
try {
await create(endpoint, formData, submission, Submission.fromJSONCreate, 'multipart/form-data');
addSuccessMessage(t('toasts.messages.success'), t('toasts.messages.submissions.create.success'));
} catch {}
} catch (e) {
console.log(e);
}
}

async function deleteSubmission(id: string): Promise<void> {
Expand Down

0 comments on commit 54305f3

Please sign in to comment.