Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(remix): Don't log missing parameters warning on server-side. #8269

Merged
merged 2 commits into from Jun 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/remix/src/performance/client.tsx
@@ -1,7 +1,7 @@
import type { ErrorBoundaryProps} from '@sentry/react';
import type { ErrorBoundaryProps } from '@sentry/react';
import { WINDOW, withErrorBoundary } from '@sentry/react';
import type { Transaction, TransactionContext } from '@sentry/types';
import { logger } from '@sentry/utils';
import { isNodeEnv, logger } from '@sentry/utils';
import * as React from 'react';

const DEFAULT_TAGS = {
Expand Down Expand Up @@ -101,6 +101,7 @@ export function withSentry<P extends Record<string, unknown>, R extends React.FC
// Early return when any of the required functions is not available.
if (!_useEffect || !_useLocation || !_useMatches || !_customStartTransaction) {
__DEBUG_BUILD__ &&
!isNodeEnv() &&
logger.warn('Remix SDK was unable to wrap your root because of one or more missing parameters.');

// @ts-ignore Setting more specific React Component typing for `R` generic above
Expand Down