fix: error handling in fs routes (#2474)
Ran into an issue where we weren't responding with the correct status code and passed response headers. This was a bit of a rabbit hole and it was caused by us wrapping to more error handling middlewares than necessary.
This commit is contained in:
+5
-1
@@ -170,7 +170,11 @@ export class FreshReqContext<State>
|
||||
: new Headers();
|
||||
|
||||
headers.set("Content-Type", "text/html; charset=utf-8");
|
||||
const responseInit: ResponseInit = { status: init.status ?? 200, headers };
|
||||
const responseInit: ResponseInit = {
|
||||
status: init.status ?? 200,
|
||||
headers,
|
||||
statusText: init.statusText,
|
||||
};
|
||||
|
||||
let partialId = "";
|
||||
if (this.url.searchParams.has("fresh-partial")) {
|
||||
|
||||
Reference in New Issue
Block a user