diff --git a/tools/file_packager.py b/tools/file_packager.py index 956ab8a3530cf..9f39984b46fca 100755 --- a/tools/file_packager.py +++ b/tools/file_packager.py @@ -914,6 +914,10 @@ def generate_js(data_target, data_files, metadata): for (var chunkId = 0; chunkId < chunkCount; chunkId++) { var getRequest = packages.get(`package/${packageName}/${chunkId}`); getRequest.onsuccess = function(event) { + if (!event.target.result) { + errback(new Error(`CachedPackageNotFound for: ${packageName}`)); + return; + } // If there's only 1 chunk, there's nothing to concatenate it with so we can just return it now if (chunkCount == 1) { callback(event.target.result);