Return a valid error type upon volume request before mount.

Rejection from the extension should return either of the error code in
ProviderError, or it will crash extension by a runtime error.

Bug: 812123
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I06d858bc7cb0eb325c7e8b188cfee559d05a078e
Reviewed-on: https://chromium-review.googlesource.com/926441
Commit-Queue: Tatsuhisa Yamaguchi <yamaguchi@chromium.org>
Reviewed-by: Yuki Awano <yawano@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#538000}(cherry picked from commit 6217f45cd99d80aa76542460d91e882a857067b5)
Reviewed-on: https://chromium-review.googlesource.com/933661
Reviewed-by: Tatsuhisa Yamaguchi <yamaguchi@chromium.org>
Cr-Commit-Position: refs/branch-heads/3325@{#564}
Cr-Branched-From: bc084a8b5afa3744a74927344e304c02ae54189f-refs/heads/master@{#530369}
diff --git a/chrome/browser/resources/chromeos/zip_archiver/js/app.js b/chrome/browser/resources/chromeos/zip_archiver/js/app.js
index 0083a09..da1316b 100644
--- a/chrome/browser/resources/chromeos/zip_archiver/js/app.js
+++ b/chrome/browser/resources/chromeos/zip_archiver/js/app.js
@@ -243,8 +243,10 @@
     }
 
     return unpacker.app.moduleLoadedPromise.then(function() {
-      if (!unpacker.app.volumeLoadedPromises[fileSystemId])
-        return Promise.reject(fileSystemId + ' requested before mounting');
+      if (!unpacker.app.volumeLoadedPromises[fileSystemId]) {
+        console.error(fileSystemId + ' requested before mounting');
+        return Promise.reject('NOT_FOUND');
+      }
 
       // Decrement the counter when the mounting process ends.
       unpacker.app.volumeLoadedPromises[fileSystemId]