express icon indicating copy to clipboard operation
express copied to clipboard

Crash without any error log!

Open whes1015 opened this issue 1 year ago • 11 comments

After using the following code, express still terminates and does not output anything to the console

process
	.on("unhandledRejection", (reason, p) => {
		console.log(reason, " | Unhandled Rejection at Promise | ", p);
	})
	.on("uncaughtException", err => {
		console.log(err, " | Uncaught Exception thrown | ");
	});

When I comment the below snippet in my code, the crash disappears

app.post("/*", (...args) => {
	args[1].redirect("https://github.com/");
});

express version: 4.18.2

whes1015 avatar Nov 19 '22 01:11 whes1015