add error handling

This commit is contained in:
Yann Braga 2023-04-24 22:22:41 +02:00
parent ee01dad73a
commit 205e5fa79d

View File

@ -7,8 +7,12 @@ const uploadBench = async () => {
// const data = {} as Record<string, any>;
await Promise.all(
keys.map(async (key) => {
const val = await loadBench({ key, rootDir: CODE_DIRECTORY });
console.log({ key, val });
try {
const val = await loadBench({ key, rootDir: CODE_DIRECTORY });
console.log({ key, val });
} catch (err) {
console.log(`Failed to load bench for the key ${key}:`, err);
}
})
);
};