Skip to content

Commit 20b6d0e

Browse files
committed
improve error reporting
1 parent f2ced9b commit 20b6d0e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/db/src/impl/pouch/courseDB.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import CourseLookup from './courseLookupDB';
2727
export class CoursesDB implements CoursesDBInterface {
2828
public async getCourseList(): Promise<CourseConfig[]> {
2929
const crsList = await CourseLookup.allCourses();
30-
console.log(`AllCourses: ${crsList.map((c) => c.name)}`);
30+
console.log(`AllCourses: ${crsList.map((c) => c.name + ', ' + c._id + '\n\t')}`);
3131

3232
const cfgs = await Promise.all(
3333
crsList.map(async (c) => {
@@ -36,6 +36,7 @@ export class CoursesDB implements CoursesDBInterface {
3636
console.log(`Found cfg: ${JSON.stringify(cfg)}`);
3737
return cfg;
3838
} catch (e) {
39+
console.warn(`Error fetching cfg for course ${c.name}, ${c._id}: ${e}`);
3940
return undefined;
4041
}
4142
})

0 commit comments

Comments
 (0)