summaryrefslogtreecommitdiff
path: root/packages/integrations/node/src
diff options
context:
space:
mode:
authorGravatar Arsh <69170106+lilnasy@users.noreply.github.com> 2023-08-19 02:21:46 +0530
committerGravatar GitHub <noreply@github.com> 2023-08-18 15:51:46 -0500
commit4c15c069691ca25efcb9ebb7d9b45605cd136ed3 (patch)
tree77fcde71d5b561aed3fec7852cf21ac598f752db /packages/integrations/node/src
parentbe2d60285e43f0629974ff86de037190c586d265 (diff)
downloadastro-4c15c069691ca25efcb9ebb7d9b45605cd136ed3.tar.gz
astro-4c15c069691ca25efcb9ebb7d9b45605cd136ed3.tar.zst
astro-4c15c069691ca25efcb9ebb7d9b45605cd136ed3.zip
fix(node): delegate preview's not found and error handling to core/app (#8141)
* fix(node): delegate preview's not found and error handling to core/app * add changeset --------- Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Diffstat (limited to 'packages/integrations/node/src')
-rw-r--r--packages/integrations/node/src/preview.ts10
1 files changed, 1 insertions, 9 deletions
diff --git a/packages/integrations/node/src/preview.ts b/packages/integrations/node/src/preview.ts
index 4a4db4632..62a4301c1 100644
--- a/packages/integrations/node/src/preview.ts
+++ b/packages/integrations/node/src/preview.ts
@@ -38,15 +38,7 @@ const preview: CreatePreviewServer = async function ({
}
const handler: http.RequestListener = (req, res) => {
- ssrHandler(req, res, (ssrErr: any) => {
- if (ssrErr) {
- res.writeHead(500);
- res.end(ssrErr.toString());
- } else {
- res.writeHead(404);
- res.end();
- }
- });
+ ssrHandler(req, res);
};
const baseWithoutTrailingSlash: string = base.endsWith('/')