Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error handlers not triggered #538

Open
andrasz opened this issue Oct 20, 2016 · 1 comment
Open

Error handlers not triggered #538

andrasz opened this issue Oct 20, 2016 · 1 comment

Comments

@andrasz
Copy link

andrasz commented Oct 20, 2016

Hi,

I created a simple web server like this

http.createServer(function (request, response) {
    // attaching error handles to requrests and responses
    request.on('error', function (err) {
        console.error(err);
        response.statusCode = 400;
        response.end();
    });
}).listen(process.env.PORT);

When there is an unhadled exception, the error handler is not triggered for some reason. I tried to debug this with the iisnode debugger, when the exception occurs, but the debugger says that the connection was reset (debugger console: read ECONNRESET). And it doesn't work any more.

I found a post on SO that guided me to clustering, but as I found this is also not supported by the iisnode (according to this )

I'm kind of new to nodejs apps so I am not sure if this is a bug? Or am I missing something?

BTW I am using windows 10 with IIS 10.0.something if that's relevant.

Regards,
Zoli

@christiaanwesterbeek
Copy link

What have you learned in the mean time about the problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants