Open
Description
What version of Elysia is running?
1.2.2
What platform is your computer?
Darwin 24.1.0 arm64 arm
What steps can reproduce the bug?
Run the example from https://elysiajs.com/essential/life-cycle.html#local-error
The if clause is removed to simulate an error case.
import { Elysia } from "elysia";
new Elysia()
.get("/", () => "Hello", {
beforeHandle({ error }) {
return error(401);
},
error({ error }) {
return "Handled";
},
})
.listen(3000);
What is the expected behavior?
"Handled"
What do you see instead?
The error
hook is not called, got "Unauthorized" instead.
Additional information
No response
Have you try removing the node_modules
and bun.lockb
and try again yet?
No response