From 270ee650f21cfa84135c65180ddf6b29bf592ee1 Mon Sep 17 00:00:00 2001 From: Brieuc Dubois Date: Wed, 17 Jan 2024 00:19:32 +0100 Subject: [PATCH] Improve filter parsing error message --- frontend/src/lib/types/Filter.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/frontend/src/lib/types/Filter.ts b/frontend/src/lib/types/Filter.ts index 14b13d2..27fafaf 100644 --- a/frontend/src/lib/types/Filter.ts +++ b/frontend/src/lib/types/Filter.ts @@ -1,9 +1,8 @@ -import { writable } from 'svelte/store'; -import View from './View'; +import filtersApi from '$lib/api/filtersApi'; +import { toastAlert } from '$lib/utils/toasts'; import ProjectTag from './ProjectTag'; import TagOption from './TagOption'; -import { toastAlert } from '$lib/utils/toasts'; -import filtersApi from '$lib/api/filtersApi'; +import View from './View'; export default class Filter { private _id: number; @@ -137,13 +136,13 @@ export default class Filter { if (!view) view = View.fromId(json.view_id); if (!view) { - toastAlert('Failed to parse filter: view not found'); + toastAlert(`Failed to parse filter: view ${json.view_id} not found`); return null; } const projectTag = ProjectTag.fromId(json.tag_id); if (!projectTag) { - toastAlert('Failed to parse filter: projectTag not found'); + toastAlert(`Failed to parse filter: projectTag ${json.tag_id} not found`); return null; }