Skip to content

Express global exception handler #750

@Toub

Description

@Toub

In case of uncaught exception in Express, Express server crashes.
What about catching and logging uncaught exceptions in app.js?

// catch global exceptions
process.on('uncaughtException', function (err) {
    console.log('Caught exception: ',  err);
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions