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

[BUG] On limit exceeded, response is not given #28

Closed
2 tasks done
qlaffont opened this issue Apr 4, 2024 · 10 comments
Closed
2 tasks done

[BUG] On limit exceeded, response is not given #28

qlaffont opened this issue Apr 4, 2024 · 10 comments
Labels
type: bug This issue defined as a bug

Comments

@qlaffont
Copy link

qlaffont commented Apr 4, 2024

Before open the issue

  • I tried remove node_modules/, bun.lockb, and do a clean installation.
  • I tried update Bun, and Elysia to latest version.

Describe the bug
When a user reach the limit, the response is never given

To Reproduce
Please provide a small reproduction project if possible. Steps to reproduce the behavior:

  1. Go to 'https://github.com/qlaffont/starter-elysia'
  2. Run bun i && docker-compose up -d && cp .env.example .env && bun dev
  3. Go to http://localhost:3000/swagger and execute /auth/login with random password and email more than 6 times
  4. You will see that the response is never given to the client on 6th time

Expected behavior
A clear and concise description of what you expected to happen.
Return response 429

Environments

  1. Bun version: 1.1.0
  2. Host Operating system: Linux pop-os 6.8.0-76060800daily20240311-generic #202403110203171139393022.04~331756a SMP PREEMPT_DYNAMIC Mon M x86_64 x86_64 x86_64 GNU/Linux
  3. Running on Docker?: no

Screenshots
image
image

Additional Context
For me I have checked source code, nothing seems strange or with bugs. So maybe elysia directly ?

@rayriffy rayriffy added the type: bug This issue defined as a bug label Apr 5, 2024
@qlaffont
Copy link
Author

qlaffont commented Apr 9, 2024

Repro updated, bug still present with last version of bun + elysia + elysia-rate-limit

@rayriffy
Copy link
Owner

rayriffy commented Apr 9, 2024

Sorry, I got super busy with my work this week. I've confirmed that my rate-limit plugin already passed rate-limited response away from plugin properly. I found this empty response is quickly solved after remove @elysiajs/server-timing plugin from server. Definitely Elysia bug again, forwarding a bug to @SaltyAom

CleanShot 2024-04-10 at 01 39 21

@rayriffy
Copy link
Owner

rayriffy commented Apr 9, 2024

Also related to #18

@qlaffont
Copy link
Author

any update @SaltyAom ?

@rayriffy
Copy link
Owner

He's on holiday (me too). He'll be back next week.

@qlaffont
Copy link
Author

any update @SaltyAom ?

@rayriffy
Copy link
Owner

1.1 just recently launched, can you try to confirm does this solves a problem?

@qlaffont
Copy link
Author

qlaffont commented May 2, 2024

No @rayriffy error still present :/ (I have updated the repro)

@SaltyAom
Copy link

SaltyAom commented May 2, 2024

Should have been fixed on elysiajs/elysia@ff73f80, published on 1.0.16.

Please update and let me know if it works.

@qlaffont
Copy link
Author

qlaffont commented May 2, 2024

Thanks I can confirm is working I close the issue !

@qlaffont qlaffont closed this as completed May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug This issue defined as a bug
Projects
None yet
Development

No branches or pull requests

3 participants