Skip to content

Commit 093d782

Browse files
committed
propagate queryRoute errors that aren't Responses
1 parent c0a2a3b commit 093d782

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

packages/react-router/lib/router/router.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3940,10 +3940,7 @@ export function createStaticHandler(
39403940
if (isResponse(error)) {
39413941
return respond(error);
39423942
}
3943-
return new Response(String(error), {
3944-
status: 500,
3945-
statusText: "Unexpected Server Error",
3946-
});
3943+
throw error;
39473944
}
39483945
);
39493946
return response;

0 commit comments

Comments
 (0)