Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit 4f76eb5

Browse files
committed
Fix onError callback of ssr
1 parent 61a5a77 commit 4f76eb5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

server/renderer.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,8 +380,9 @@ async function initSSR(
380380
res = await res;
381381
}
382382
} catch (error) {
383-
if (!(res = onError?.(error, { by: "ssr", url: req.url }))) {
384-
throw error;
383+
res = onError?.(error, { by: "ssr", url: req.url });
384+
if (res instanceof Response) {
385+
throw res;
385386
}
386387
}
387388
if (res instanceof Response) {

0 commit comments

Comments
 (0)