|
@@ -63,10 +63,10 @@ function createExpress(ctx: Context, staticsPath?: string) {
|
|
|
|
|
|
// Add middleware to handle any errors forwarded from previous handlers via `next(err)`
|
|
|
const catchError: ErrorRequestHandler = (err, req, res, next) => {
|
|
|
+ ctx.log.error(err)
|
|
|
if (!res.headersSent) {
|
|
|
- http.internalServerError(res, next, { reason: (err as Error).message })
|
|
|
+ http.internalServerError(res, next)
|
|
|
}
|
|
|
- ctx.log.error(err)
|
|
|
}
|
|
|
app.use(catchError)
|
|
|
|