Archived
1
0

Log all plugin errors as errors

This commit is contained in:
Asher 2020-10-07 12:25:23 -05:00
parent ddda280df4
commit c2ac126a50
No known key found for this signature in database
GPG Key ID: D63C1EF81242354A

View File

@ -41,13 +41,9 @@ const loadPlugin = async (pluginPath: string, httpServer: HttpServer, args: Args
field("version", require(path.join(pluginPath, "package.json")).version || "n/a"),
)
} catch (error) {
if (error.code !== "MODULE_NOT_FOUND") {
logger.warn(error.message)
} else {
logger.error(error.message)
}
}
}
/**
* Load all plugins in the specified directory.