Improve filter parsing error message
This commit is contained in:
parent
67159abf39
commit
270ee650f2
|
@ -1,9 +1,8 @@
|
||||||
import { writable } from 'svelte/store';
|
import filtersApi from '$lib/api/filtersApi';
|
||||||
import View from './View';
|
import { toastAlert } from '$lib/utils/toasts';
|
||||||
import ProjectTag from './ProjectTag';
|
import ProjectTag from './ProjectTag';
|
||||||
import TagOption from './TagOption';
|
import TagOption from './TagOption';
|
||||||
import { toastAlert } from '$lib/utils/toasts';
|
import View from './View';
|
||||||
import filtersApi from '$lib/api/filtersApi';
|
|
||||||
|
|
||||||
export default class Filter {
|
export default class Filter {
|
||||||
private _id: number;
|
private _id: number;
|
||||||
|
@ -137,13 +136,13 @@ export default class Filter {
|
||||||
|
|
||||||
if (!view) view = View.fromId(json.view_id);
|
if (!view) view = View.fromId(json.view_id);
|
||||||
if (!view) {
|
if (!view) {
|
||||||
toastAlert('Failed to parse filter: view not found');
|
toastAlert(`Failed to parse filter: view ${json.view_id} not found`);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const projectTag = ProjectTag.fromId(json.tag_id);
|
const projectTag = ProjectTag.fromId(json.tag_id);
|
||||||
if (!projectTag) {
|
if (!projectTag) {
|
||||||
toastAlert('Failed to parse filter: projectTag not found');
|
toastAlert(`Failed to parse filter: projectTag ${json.tag_id} not found`);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue