3 module
.exports
= (err
) => {
4 const detailsArr
= Array
.isArray(err
.details
) ? err
.details : [ err
.details
];
5 return `<!DOCTYPE html>
8 <title>${err.statusCode} ${err.errorMessage}</title>
11 <h1>${err.errorMessage}</h1>` +
12 (!err
.details
? '' : detailsArr
.map((d
) => `\n <p>${d}</p>`).join('')) + `