Skip to content

Commit 7cc4dd3

Browse files
committed
Only send error stack if it exists
1 parent 092843a commit 7cc4dd3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ function fastbootExpressMiddleware(distPath, options) {
5656
next();
5757
} else {
5858
log(500, "Unknown Error: " + error.stack);
59-
res.status(500).send(error.stack);
59+
if (error.stack) {
60+
res.status(500).send(error.stack);
61+
} else {
62+
res.sendStatus(500);
63+
}
6064
}
6165
}
6266
};

0 commit comments

Comments
 (0)