mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-08 03:20:12 +08:00
fix types issue
This commit is contained in:
1 parent
ec63bba0fe
commit
807974d727
15 files changed
+49
-25
No files matched your search
@@ -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)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user