Skip to content

Commit 0ee85ea

Browse files
committed
fix(remix): Do not capture error responses that are not 5xx on Remix v2.
1 parent 739d904 commit 0ee85ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/remix/src/client/errors.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import type { ErrorResponse } from '../utils/vendor/types';
1313
export function captureRemixErrorBoundaryError(error: unknown): string | undefined {
1414
let eventId: string | undefined;
1515
const isClientSideRuntimeError = !isNodeEnv() && error instanceof Error;
16-
const isRemixErrorResponse = isRouteErrorResponse(error);
16+
const isRemixErrorResponse = isRouteErrorResponse(error) && error.status >= 500;
1717
// Server-side errors apart from `ErrorResponse`s also appear here without their stacktraces.
1818
// So, we only capture:
1919
// 1. `ErrorResponse`s

0 commit comments

Comments
 (0)