Skip to content

Commit a4e6a66

Browse files
committed
fix type error in client handleError
1 parent f983c2e commit a4e6a66

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/sveltekit/src/client/handleError.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,16 @@ function defaultErrorHandler({ error }: Parameters<HandleClientError>[0]): Retur
1111
});
1212
}
1313

14+
// TODO: add backwards-compatible type for kit 1.x (soon)
15+
type HandleClientErrorInput = Parameters<HandleClientError>[0];
16+
1417
/**
1518
* Wrapper for the SvelteKit error handler that sends the error to Sentry.
1619
*
1720
* @param handleError The original SvelteKit error handler.
1821
*/
1922
export function handleErrorWithSentry(handleError: HandleClientError = defaultErrorHandler): HandleClientError {
20-
return (input: { error: unknown; event: NavigationEvent }): ReturnType<HandleClientError> => {
23+
return (input: HandleClientErrorInput): ReturnType<HandleClientError> => {
2124
captureException(input.error, {
2225
mechanism: {
2326
type: 'sveltekit',

0 commit comments

Comments
 (0)