mirror of
https://github.com/maciejpedzich/spotifyplaylistarchive.com.git
synced 2024-11-09 23:13:01 +01:00
17 lines
388 B
TypeScript
17 lines
388 B
TypeScript
export default defineNuxtPlugin((nuxtApp) => {
|
|
nuxtApp.vueApp.config.errorHandler = (
|
|
error: Error & { status?: number },
|
|
_context
|
|
) => {
|
|
// eslint-disable-next-line no-console
|
|
console.error(error);
|
|
|
|
nuxtApp.vueApp.config.globalProperties.$toast.add({
|
|
severity: 'error',
|
|
summary: 'Error',
|
|
life: 5000,
|
|
detail: error.message
|
|
});
|
|
};
|
|
});
|