diff --git a/src/DefaultContentManager.php b/src/DefaultContentManager.php
index 40acca2..e306598 100644
--- a/src/DefaultContentManager.php
+++ b/src/DefaultContentManager.php
@@ -290,6 +290,9 @@ class DefaultContentManager implements DefaultContentManagerInterface {
     foreach ($info['default_content'] as $entity_type => $uuids) {
       foreach ($uuids as $uuid) {
         $entity = $this->entityRepository->loadEntityByUuid($entity_type, $uuid);
+        if (!$entity) {
+          throw new \InvalidArgumentException(new FormattableMarkup('Entity @type with UUID @uuid does not exist', ['@type' => $entity_type, '@uuid' => $uuid]));
+        }
         $exported_content[$entity_type][$uuid] = $this->exportContent($entity_type, $entity->id());
       }
     }
diff --git a/src/DefaultContentManagerInterface.php b/src/DefaultContentManagerInterface.php
index fdf67a9..df210d8 100644
--- a/src/DefaultContentManagerInterface.php
+++ b/src/DefaultContentManagerInterface.php
@@ -60,6 +60,8 @@ interface DefaultContentManagerInterface {
    *
    * @return string[][]
    *   The serialized entities keyed by entity type and UUID.
+   *
+   * @throws \InvalidArgumentException if any UUID is not found.
    */
   public function exportModuleContent($module_name);
 
diff --git a/tests/src/Kernel/DefaultContentManagerIntegrationTest.php b/tests/src/Kernel/DefaultContentManagerIntegrationTest.php
index 6ccc77f..46e856a 100644
--- a/tests/src/Kernel/DefaultContentManagerIntegrationTest.php
+++ b/tests/src/Kernel/DefaultContentManagerIntegrationTest.php
@@ -186,4 +186,27 @@ class DefaultContentManagerIntegrationTest extends KernelTestBase {
     $this->assertEqual($content['node'][$test_uuid], $expected_node);
   }
 
+  /**
+   * Tests exportModuleContent().
+   */
+  public function testModuleExportException() {
+    \Drupal::service('module_installer')->install([
+      'node',
+      'default_content',
+      'default_content_export_test',
+    ]);
+    \Drupal::service('router.builder')->rebuild();
+    $this->defaultContentManager = \Drupal::service('default_content.manager');
+
+    // Should throw an exception for missing uuid
+    $e = FALSE;
+    try {
+      $this->defaultContentManager->exportModuleContent('default_content_export_test');
+    }
+    catch (\InvalidArgumentException $e) {
+      
+    }
+    $this->assertTrue($e instanceof \InvalidArgumentException);
+  }
+
 }
