{"record":{"id":"ba1f3918b07fbc40","repo":"facebook/react","slug":"an-error-occurred-in-the-componentname-compon","errorCode":null,"errorMessage":"An error occurred in the <${componentName}> component.\n\nConsider adding an error boundary to your tree to customize error handling behavior.\nVisit https://react.dev/link/error-boundaries to learn more about error boundaries.","messagePattern":"An error occurred in the <(.+?)> component\\.\n\nConsider adding an error boundary to your tree to customize error handling behavior\\.\nVisit https://react\\.dev/link/error-boundaries to learn more about error boundaries\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/react-reconciler/src/ReactFiberErrorLogger.js","lineNumber":48,"sourceCode":"): void {\n  // Overriding this can silence these warnings e.g. for tests.\n  // See https://github.com/facebook/react/pull/13384\n\n  // For uncaught root errors we report them as uncaught to the browser's\n  // onerror callback. This won't have component stacks and the error addendum.\n  // So we add those into a separate console.warn.\n  reportGlobalError(error);\n  if (__DEV__) {\n    const componentNameMessage = componentName\n      ? `An error occurred in the <${componentName}> component.`\n      : 'An error occurred in one of your React components.';\n\n    const errorBoundaryMessage =\n      'Consider adding an error boundary to your tree to customize error handling behavior.\\n' +\n      'Visit https://react.dev/link/error-boundaries to learn more about error boundaries.';\n\n    try {\n      console.warn(\n        '%s\\n\\n%s\\n',\n        componentNameMessage,\n        errorBoundaryMessage,\n        // We let our console.error wrapper add the component stack to the end.\n      );\n    } finally {\n      // ignore\n    }\n  }\n}\n\nexport function defaultOnCaughtError(\n  error: mixed,\n  errorInfo: {\n    +componentStack?: ?string,\n    +errorBoundary?: ?component(...props: any),\n  },\n): void {","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/facebook/react/blob/eafeac097ba51e1eab809c07102126bd5f8e5425/packages/react-reconciler/src/ReactFiberErrorLogger.js#L30-L66","documentation":"Error \"An error occurred in the <${componentName}> component.\n\nConsider adding an error boundary to your tree to customize error handling behavior.\nVisit https://react.dev/link/error-boundaries to learn more about error boundaries.\" thrown in facebook/react.","triggerScenarios":"Thrown at packages/react-reconciler/src/ReactFiberErrorLogger.js:48 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"eafeac097ba51e1eab809c07102126bd5f8e5425","analyzedAt":"2026-08-21T22:01:08.818Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}