-
-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Labels
bugSomething isn't workingSomething isn't working
Description
What version of Elysia is running?
1.4.17
What platform is your computer?
Darwin 25.1.0 arm64 arm
What steps can reproduce the bug?
- Create an Eden client pointing to an offline server
- Make any request
- The promise rejects with an unhandled error instead of returning it in the error field
const client = treaty<App>('http://localhost:9999') // server not running
const { data, error } = await client.get() // throws instead of returning errorWhat is the expected behavior?
Network errors should be returned in the error field, allowing graceful error handling:
const { data, error } = await client.get()
if (error) {
console.log(error.status) // 503
console.log(error.value) // Error: Unable to connect...
}What do you see instead?
Unhandled promise rejection:
Unable to connect. Is the computer able to access the url?
Additional information
Affects both treaty and edenFetch clients.
Have you try removing the node_modules and bun.lockb and try again yet?
yes
Fix implementation
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working