Open
Description
What version of Elysia is running?
1.3.5
What platform is your computer?
Darwin 24.4.0 arm64 arm
What steps can reproduce the bug?
import { ElysiaCustomStatusResponse, status as statusFromError } from "elysia/error";
console.log(
"Is statusFromError an instance of ElysiaCustomStatusResponse?",
statusFromError(500, "Internal Server Error") instanceof
ElysiaCustomStatusResponse
);
// Is statusFromError an instance of ElysiaCustomStatusResponse? true
import { status as statusFromIndex } from "elysia";
console.log(
"Is statusFromIndex an instance of ElysiaCustomStatusResponse?",
statusFromIndex(500, "Internal Server Error") instanceof
ElysiaCustomStatusResponse
);
// Is statusFromIndex an instance of ElysiaCustomStatusResponse? false
What is the expected behavior?
Is statusFromError an instance of ElysiaCustomStatusResponse? true
Is statusFromIndex an instance of ElysiaCustomStatusResponse? true
What do you see instead?
Is statusFromError an instance of ElysiaCustomStatusResponse? true
Is statusFromIndex an instance of ElysiaCustomStatusResponse? false
Additional information
This isn't a showstopper for me, so no rush. But I wanted to let you know and others know of this behavior. Have a good one 😄
Have you try removing the node_modules
and bun.lockb
and try again yet?
yes