diff --git a/src/Exporter.php b/src/Exporter.php
index 2043484..2504f98 100644
--- a/src/Exporter.php
+++ b/src/Exporter.php
@@ -165,6 +165,9 @@ class Exporter implements ExporterInterface {
     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/ExporterInterface.php b/src/ExporterInterface.php
index 7f2d94d..5f4176e 100644
--- a/src/ExporterInterface.php
+++ b/src/ExporterInterface.php
@@ -41,6 +41,8 @@ interface ExporterInterface {
    *
    * @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 45a0db2..947aa76 100644
--- a/tests/src/Kernel/DefaultContentManagerIntegrationTest.php
+++ b/tests/src/Kernel/DefaultContentManagerIntegrationTest.php
@@ -186,4 +186,22 @@ class ExporterIntegrationTest 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');
+
+    $this->setExpectedException(\InvalidArgumentException::class);
+
+    // Should throw an exception for missing uuid in default_content_export_test
+    $this->defaultContentManager->exportModuleContent('default_content_export_test');
+  }
+
 }
