« get me outta code hell

Merge branch 'preview' into data-format-cleanup - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/util
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-02-05 09:37:33 -0400
committer(quasar) nebula <qznebula@protonmail.com>2023-02-05 09:37:33 -0400
commit4dbd31b0329b9618341d494a8d6e04f5c30ff32e (patch)
tree6d8eb9e8c3ec15cbd63ce29382ee5ce5cdb0abe6 /src/util
parentf554897f3728fcb771fe26dffad898a54b37335a (diff)
parentf36f93b702729f14021746d56b192b25ac3ed1b7 (diff)
Merge branch 'preview' into data-format-cleanup
Diffstat (limited to 'src/util')
-rw-r--r--src/util/io.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util/io.js b/src/util/io.js
index 6cc89b56..12e87f4d 100644
--- a/src/util/io.js
+++ b/src/util/io.js
@@ -12,7 +12,9 @@ export async function findFiles(dataPath, {
   try {
     files = await readdir(dataPath);
   } catch (error) {
-    throw new AggregateError([error], `Failed to list files from ${dataPath}`);
+    throw Object.assign(
+      new AggregateError([error], `Failed to list files from ${dataPath}`),
+      {code: error.code});
   }
 
   return files