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:
@@ -127,7 +127,7 @@ export function getCodeFrame(stack: string, rootDir: string) {
|
||||
file.line - 1,
|
||||
file.column - 1,
|
||||
);
|
||||
} catch (err) {
|
||||
} catch {
|
||||
// Ignore
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ Deno.test(
|
||||
.use(async (ctx) => {
|
||||
try {
|
||||
return await ctx.next();
|
||||
} catch (err) {
|
||||
} catch {
|
||||
return ctx.render(<p>ok</p>);
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user