Skip to content

Commit 43ace49

Browse files
authored
fix(nextjs): Remove index signaure in captureUnderscoreErrorException argument type (#5463)
This removes the index signature in the `ContextOrProps` type in our nextjs `_error` helper function, `captureUnderscoreErrorException`, as it's causing build errors for people writing their `_error` page in TS. Note: The problem I anticipated[1], which led me to add it in the first place, hasn't materialized in my testing. Fixes #5448. [1] #5448 (comment)
1 parent 57c964a commit 43ace49

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/nextjs/src/utils/_error.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import { addExceptionMechanism, addRequestDataToEvent } from '@sentry/utils';
44
import { NextPageContext } from 'next';
55

66
type ContextOrProps = {
7-
[key: string]: unknown;
87
req?: NextPageContext['req'];
98
res?: NextPageContext['res'];
109
err?: NextPageContext['err'] | string;
10+
pathname?: string;
1111
statusCode?: number;
1212
};
1313

0 commit comments

Comments
 (0)