mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-11-23 19:29:17 +03:00
Fix error handling bug
Errors were not properly handled as `error` was not bound
This commit is contained in:
parent
7ca56c1691
commit
2b050fb9c7
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user