Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eden Treaty errors if a route is the same name as an HTTP verb (get/post/options/etc) #919

Open
Yhprum opened this issue Nov 16, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Yhprum
Copy link

Yhprum commented Nov 16, 2024

What version of Elysia is running?

1.1.23

What platform is your computer?

Microsoft Windows NT 10.0.19045.0 x64

What steps can reproduce the bug?

const optionsController = new Elysia().get("/options/:symbol", ...)

then using Eden treaty
const { data, error } = await app.options({ symbol: contractSymbol }).get()
errors with app.options being undefined. The typechecking of data returns the correct type that I expect from that endpoint, but it errors during runtime

What is the expected behavior?

Either the data returns correctly or the typechecking would give me an error letting me know I can't use http verbs as endpoints

What do you see instead?

Typechecking returns as expected, code errors during runtime

Additional information

No response

Have you try removing the node_modules and bun.lockb and try again yet?

No response

@Yhprum Yhprum added the bug Something isn't working label Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant