Skip to content

Commit 4438fdd

Browse files
committed
Fixed typing issues in svelte example
1 parent 3c1e208 commit 4438fdd

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

example/svelte-kit/src/hooks.client.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Exceptionless } from "@exceptionless/browser";
2+
import { toError } from "@exceptionless/core";
23

34
Exceptionless.startup(c => {
45
c.apiKey = "LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw";
@@ -11,5 +12,5 @@ Exceptionless.startup(c => {
1112
/** @type {import('@sveltejs/kit').HandleClientError} */
1213
export async function handleError({ error, event }) {
1314
console.log('client error handler');
14-
await Exceptionless.submitException(error);
15+
await Exceptionless.submitException(toError(error));
1516
}

example/svelte-kit/src/hooks.server.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { toError } from "@exceptionless/core";
12
import { Exceptionless } from "@exceptionless/node";
23

34
Exceptionless.startup(c => {
@@ -11,5 +12,5 @@ Exceptionless.startup(c => {
1112
/** @type {import('@sveltejs/kit').HandleServerError} */
1213
export async function handleError({ error, event }) {
1314
console.log('server error handler');
14-
await Exceptionless.submitException(error);
15+
await Exceptionless.submitException(toError(error));
1516
}

0 commit comments

Comments
 (0)