docs.nestjs.com icon indicating copy to clipboard operation
docs.nestjs.com copied to clipboard

Rate Limiting docs is misleading for Websockets example

Open zenstok opened this issue 3 weeks ago • 0 comments

I'm submitting a...

  • [ ] Regression
  • [ ] Bug report
  • [ ] Feature request
  • [X] Documentation issue or request (new chapter/page)
  • [ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current Behavior

The NestJS documentation for Websockets and rate limiting provides an example of using the throttler guard with Websockets. However, it does not take into account multiple throttle limit configurations. The handleRequest method will be called multiple times when multiple throttler limits are set.

Expected Behavior

The documentation should be updated to reflect that users need to handle multiple throttle limits if they are configured, rather than just a single limit. This ensures users are not misled into writing code that only handles one limit, which is no longer valid with multiple throttler limits configured.

zenstok avatar Jun 20 '24 06:06 zenstok