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
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 */
1922export 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' ,
You can’t perform that action at this time.
0 commit comments