mirror of
https://github.com/cupcakearmy/blaze.git
synced 2024-12-22 16:26:26 +00:00
Show info page in case of error
This commit is contained in:
parent
b037021d0d
commit
8a5746f27e
12
index.ts
12
index.ts
@ -134,10 +134,14 @@ app.get("/", async (req, res) => {
|
||||
</html>
|
||||
`;
|
||||
|
||||
const minifiedSerp = minify(html, minifierOptions);
|
||||
|
||||
res.set("X-Blaze-Etag", etag(minifiedSerp));
|
||||
res.send(minifiedSerp);
|
||||
try {
|
||||
const minifiedSerp = minify(html, minifierOptions);
|
||||
res.set("X-Blaze-Etag", etag(minifiedSerp));
|
||||
res.send(minifiedSerp);
|
||||
} catch (e) {
|
||||
console.log("Error during html minifier:", e);
|
||||
res.sendFile(path.join(__dirname, "/not_blazed.html"));
|
||||
}
|
||||
};
|
||||
xhr.send();
|
||||
} catch (err) {
|
||||
|
Loading…
Reference in New Issue
Block a user