Skip to content

Commit

Permalink
fix(nextjs): Remove index signaure in `captureUnderscoreErrorExceptio…
Browse files Browse the repository at this point in the history
…n` 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)
  • Loading branch information
lobsterkatie authored Jul 26, 2022
1 parent 57c964a commit 43ace49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/nextjs/src/utils/_error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { addExceptionMechanism, addRequestDataToEvent } from '@sentry/utils';
import { NextPageContext } from 'next';

type ContextOrProps = {
[key: string]: unknown;
req?: NextPageContext['req'];
res?: NextPageContext['res'];
err?: NextPageContext['err'] | string;
pathname?: string;
statusCode?: number;
};

Expand Down

0 comments on commit 43ace49

Please sign in to comment.