diff --git a/packages/react-reconciler/src/ReactFiberBeginWork.js b/packages/react-reconciler/src/ReactFiberBeginWork.js index f86a7baaff4a6..1e613daac5b04 100644 --- a/packages/react-reconciler/src/ReactFiberBeginWork.js +++ b/packages/react-reconciler/src/ReactFiberBeginWork.js @@ -3193,8 +3193,9 @@ function beginWork( } invariant( false, - 'Unknown unit of work tag. This error is likely caused by a bug in ' + + 'Unknown unit of work tag (%s). This error is likely caused by a bug in ' + 'React. Please file an issue.', + workInProgress.tag, ); } diff --git a/packages/react-reconciler/src/ReactFiberCompleteWork.js b/packages/react-reconciler/src/ReactFiberCompleteWork.js index 77dd42dfebd75..0a5f80010c325 100644 --- a/packages/react-reconciler/src/ReactFiberCompleteWork.js +++ b/packages/react-reconciler/src/ReactFiberCompleteWork.js @@ -1285,8 +1285,9 @@ function completeWork( default: invariant( false, - 'Unknown unit of work tag. This error is likely caused by a bug in ' + + 'Unknown unit of work tag (%s). This error is likely caused by a bug in ' + 'React. Please file an issue.', + workInProgress.tag, ); } diff --git a/scripts/error-codes/codes.json b/scripts/error-codes/codes.json index 00edb16006fa9..5d0a777457745 100644 --- a/scripts/error-codes/codes.json +++ b/scripts/error-codes/codes.json @@ -155,7 +155,7 @@ "153": "Resuming work not yet implemented.", "154": "We should always have pending or current props. This error is likely caused by a bug in React. Please file an issue.", "155": "An indeterminate component should never have mounted. This error is likely caused by a bug in React. Please file an issue.", - "156": "Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue.", + "156": "Unknown unit of work tag (%s). This error is likely caused by a bug in React. Please file an issue.", "157": "Invalid type of work. This error is likely caused by a bug in React. Please file an issue.", "158": "There must be pending props for an initial mount. This error is likely caused by a bug in React. Please file an issue.", "159": "There should always be pending or memoized props. This error is likely caused by a bug in React. Please file an issue.",