Got this debugging another error. Filing here for reference. Original code: https://phabricator.intern.facebook.com/P59317705
} catch (thrownValue) {
        if (nextUnitOfWork === null) {
          
          didFatal = true;
          onUncaughtError(thrownValue);
          break;
        }
        if (__DEV__ && replayFailedUnitOfWorkWithInvokeGuardedCallback) {
          const failedUnitOfWork = nextUnitOfWork;
          replayUnitOfWork(failedUnitOfWork, isAsync);
        }
        const sourceFiber: Fiber = nextUnitOfWork;
        let returnFiber = sourceFiber.return;
        if (returnFiber === null) {
          
          didFatal = true;
          onUncaughtError(thrownValue);
          break;
        }
        throwException(returnFiber, sourceFiber, thrownValue);
        nextUnitOfWork = completeUnitOfWork(sourceFiber);
      }
      break;
    } while (true);