diff options
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/io.js | 4 |
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 |