-
-
Notifications
You must be signed in to change notification settings - Fork 361
Open
Labels
bugSomething isn't workingSomething isn't working
Description
What version of Elysia is running?
1.4.9
What platform is your computer?
Linux 6.14.0-29-generic x86_64 x86_64
What environment are you using
bun --version
Are you using dynamic mode?
No response
What steps can reproduce the bug?
- Send requests with optional cookies or cookies that fail custom validation.
- Observe incorrect status codes or validation errors.
- Inspect cookie configs and afterHandle behavior.
What is the expected behavior?
- Cookies should validate correctly according to their schema.
- Application-level cookie configs should be applied.
- AfterHandle loops should execute efficiently.
- Error handlers should correctly await promises.
What do you see instead?
- Cookies failing validation even when
noValidate: true
is set. - Application-level cookie settings not applied.
- Redundant assignments in afterHandle loop.
- Error responses may not resolve correctly for async handlers.
Additional information
- Affects
src/compose.ts
in thecomposeHandler
function. - Relevant lines: 1493-1535 (Cookie Validator), 1617-1624 (afterHandle loop), 1939 (error handler promise handling).
- PR can fix all issues together: correct cookie validation, merge app config, optimize afterHandle, and fix error promise.
Have you try removing the node_modules
and bun.lockb
and try again yet?
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working