fix types issue

This commit is contained in:
Chen, Tai-Lin committed 2024-03-05 00:27:08 +08:00
1 parent ec63bba0fe
commit 807974d727
15 files changed
+49 -25

No files matched your search

+3 -3
View File
@@ -9,9 +9,9 @@ const questDirectory = path.join(process.cwd(), '..', 'quests')
class QuestValidationError extends Error {
questId: string
error: any
error: Error | null
constructor(message: string, questId: string, error: any) {
constructor(message: string, questId: string, error: Error | null) {
super(message)
this.name = 'QuestValidationError'
this.questId = questId
@@ -68,7 +68,7 @@ export async function loadAndUpdateQuests() {
})
quest.exceptions.push(...exceptions)
await quest.save()
} catch (error) {
} catch (error: any) {
logger.error(`Error parsing quest`, { id, error })
throw new QuestValidationError(`Error parsing quest`, id, error)
}