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

RestJava improve request limit handling #8310

Closed
xin-hedera opened this issue May 14, 2024 · 2 comments
Closed

RestJava improve request limit handling #8310

xin-hedera opened this issue May 14, 2024 · 2 comments
Labels
bug Type: Something isn't working enhancement Type: New feature rest-java Area: Java REST API

Comments

@xin-hedera
Copy link
Collaborator

Description

The request limit parameter in js rest module is

  • with configurable default and max
  • a soft constraint, i.e., the max value is used to cap the limit, instead of used as a validation constraint

We need to do the same in rest-java

Steps to reproduce

see the description

Additional context

No response

Hedera network

other

Version

v0.106.0-SNAPSHOT

Operating system

None

@xin-hedera xin-hedera added bug Type: Something isn't working enhancement Type: New feature rest-java Area: Java REST API labels May 14, 2024
@xin-hedera xin-hedera changed the title RestJava make request limit work the same as in js rest module RestJava improve request limit handling May 14, 2024
@steven-sheehy
Copy link
Member

steven-sheehy commented May 14, 2024

I considered this, but not sure I'm convinced it needs to be a soft limit. Especially for new APIs. The reason why we made it soft before was that we lowered it from 1000 to 25 and we didn't want to break customers. You could argue it's better that customers are aware what the bounds are so they don't receive unexpected number of items in the response than desired.

@xin-hedera
Copy link
Collaborator Author

Sure. Overall I think we are going to change the course to fail the client early, close the ticket now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Type: Something isn't working enhancement Type: New feature rest-java Area: Java REST API
Projects
None yet
Development

No branches or pull requests

2 participants