From 2b050fb9c78dc98c227593c3c7e7acecd152d145 Mon Sep 17 00:00:00 2001 From: Martijn Faassen Date: Wed, 16 Feb 2022 10:25:11 +0100 Subject: [PATCH] Fix error handling bug Errors were not properly handled as `error` was not bound --- waspc/data/Generator/templates/server/src/server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/waspc/data/Generator/templates/server/src/server.js b/waspc/data/Generator/templates/server/src/server.js index f2984051f..df04144ac 100644 --- a/waspc/data/Generator/templates/server/src/server.js +++ b/waspc/data/Generator/templates/server/src/server.js @@ -24,7 +24,7 @@ const startServer = async () => { server.listen(port) - server.on('error', () => { + server.on('error', (error) => { if (error.syscall !== 'listen') throw error const bind = typeof port === 'string' ? 'Pipe ' + port : 'Port ' + port // handle specific listen errors with friendly messages