fix: load quest erorr handling

This commit is contained in:
Chen, Tai-Lin committed 2023-11-20 12:58:18 +08:00
1 parent 92b12a90d3
commit c9a24b92ad
1 file changed
+2 -2
+2 -2
View File
@@ -38,7 +38,7 @@ export function loadAndUpdateQuests() {
const image = files.includes('Dockerfile') ? id : 'base' const image = files.includes('Dockerfile') ? id : 'base'
return Quest.findByIdAndUpdate( return await Quest.findByIdAndUpdate(
id, id,
{ {
_id: id, _id: id,
@@ -50,7 +50,7 @@ export function loadAndUpdateQuests() {
} }
) )
} catch (error) { } catch (error) {
console.error(`Error parsing quest ${id}:`, error) console.error(`Error parsing quest ${id}:`, error.message)
throw error throw error
} }
}) })