output endpoint error route & index

This commit is contained in:
srgooglo 2021-10-05 10:43:13 +02:00
parent 07eb3fb550
commit 30bcd7dbec

View File

@ -257,13 +257,12 @@ class Server {
// load and set endpoints // load and set endpoints
if (Array.isArray(this.params.endpoints)) { if (Array.isArray(this.params.endpoints)) {
this.params.endpoints.forEach((endpoint) => { this.params.endpoints.forEach((endpoint, index) => {
try { try {
// append to server // append to server
this.register(endpoint) this.register(endpoint)
} catch (error) { } catch (error) {
console.error(error) console.error(`🆘 [${endpoint.route}[${index}]] Failed to load endpoint > ${error.message}`)
console.error(`🆘 Failed to load endpoint > ${error.message}`)
process.runtime.logger.dump(error) process.runtime.logger.dump(error)
} }
}) })