Added error handling notification (#536)

This commit is contained in:
Alex
2022-08-26 10:36:41 -07:00
committed by GitHub
parent 33b810de74
commit 4be9aa091b
10 changed files with 118 additions and 26 deletions

View File

@@ -6,6 +6,10 @@
import { goto } from '$app/navigation';
import { api } from '@api';
import type { PageData } from './$types';
import {
notificationController,
NotificationType
} from '$lib/components/shared-components/notification/notification';
export let data: PageData;
@@ -17,6 +21,11 @@
goto('/albums/' + newAlbum.id);
} catch (e) {
notificationController.show({
message: 'Error creating album, check console for more details',
type: NotificationType.Error
});
console.log('Error [createAlbum] ', e);
}
};