Skip to content

Commit 3511605

Browse files
committed
error handling
1 parent 14e5406 commit 3511605

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,11 @@ export class Config {
6565
await Promise.all(
6666
asyncKeys.map(async key => {
6767
if (typeof this[`_${key}`] === 'function') {
68-
this[key] = await this[`_${key}`]();
68+
try {
69+
this[key] = await this[`_${key}`]();
70+
} catch (error) {
71+
throw new Error(`Failed to resolve async config key '${key}': ${error.message}`);
72+
}
6973
}
7074
})
7175
);

0 commit comments

Comments
 (0)