Skip to content

Commit 1064443

Browse files
authored
fix(remix): Mark isRemixV2 as optional in exposed types. (#12614)
Marks `isRemixV2` as optional in the exposed types of `captureRemixServerException`. This is a follow-up on #12497
1 parent 7a9151b commit 1064443

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/remix/src/index.client.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export async function captureRemixServerException(
1717
err: unknown,
1818
name: string,
1919
request: Request,
20-
isRemixV2: boolean,
20+
isRemixV2?: boolean,
2121
): Promise<void> {
2222
DEBUG_BUILD &&
2323
logger.warn(

packages/remix/src/index.types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export declare function captureRemixServerException(
2222
err: unknown,
2323
name: string,
2424
request: Request,
25-
isRemixV2: boolean,
25+
isRemixV2?: boolean,
2626
): Promise<void>;
2727

2828
// This variable is not a runtime variable but just a type to tell typescript that the methods below can either come

packages/remix/src/utils/errors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ export async function errorHandleDataFunction(
172172
// Remix v1 does not have a `handleError` function, so we capture all errors here.
173173
if (isRemixV2 ? isResponse(err) : true) {
174174
// eslint-disable-next-line @typescript-eslint/no-floating-promises
175-
captureRemixServerException(err, name, args.request);
175+
captureRemixServerException(err, name, args.request, true);
176176
}
177177

178178
throw err;

0 commit comments

Comments
 (0)