File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
packages/sveltekit/src/client Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -11,13 +11,16 @@ function defaultErrorHandler({ error }: Parameters<HandleClientError>[0]): Retur
11
11
} ) ;
12
12
}
13
13
14
+ // TODO: add backwards-compatible type for kit 1.x (soon)
15
+ type HandleClientErrorInput = Parameters < HandleClientError > [ 0 ] ;
16
+
14
17
/**
15
18
* Wrapper for the SvelteKit error handler that sends the error to Sentry.
16
19
*
17
20
* @param handleError The original SvelteKit error handler.
18
21
*/
19
22
export function handleErrorWithSentry ( handleError : HandleClientError = defaultErrorHandler ) : HandleClientError {
20
- return ( input : { error : unknown ; event : NavigationEvent } ) : ReturnType < HandleClientError > => {
23
+ return ( input : HandleClientErrorInput ) : ReturnType < HandleClientError > => {
21
24
captureException ( input . error , {
22
25
mechanism : {
23
26
type : 'sveltekit' ,
You can’t perform that action at this time.
0 commit comments