diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 3badc3ca3..2c5502f64 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -50,7 +50,7 @@ module.exports = { }, ], env: { browser: true, es2020: true }, - ignorePatterns: ["backend_proto.d.ts", "*.svelte.d.ts", "vendor", "extra/*", "vite.config.ts"], + ignorePatterns: ["backend_proto.d.ts", "*.svelte.d.ts", "vendor", "extra/*", "vite.config.ts", "hooks.client.js"], globals: { globalThis: false, NodeListOf: false, diff --git a/ts/routes/+error.svelte b/ts/routes/+error.svelte new file mode 100644 index 000000000..8f171d33d --- /dev/null +++ b/ts/routes/+error.svelte @@ -0,0 +1,11 @@ + + + +{message} diff --git a/ts/src/hooks.client.js b/ts/src/hooks.client.js new file mode 100644 index 000000000..b6786409b --- /dev/null +++ b/ts/src/hooks.client.js @@ -0,0 +1,8 @@ +/** @type {import('@sveltejs/kit').HandleClientError} */ +export async function handleError({ error, event, status, message }) { + /** @type {any} */ + const anyError = error; + return { + message: anyError.message, + }; +}