-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Client-side parameter validation does not check 'max' value; displays erroneous error message that the max allowed value is infinity #2165
Comments
@emdelaney - Thank you for your post. We avoid doing a lot of client side validation to help ensure clients are forward compatible. For example EC2 increased the length of the IDs and if we validated the length of instance ids then when the API started to return longer IDs the client would fail to round trip the id due to validation. But in this case i agree printing the correct value range would be more useful. Marking this as feature request for displaying correct value range in the error message. |
Thanks! I have a PR open that does just that ( #2166 ). Please let me know if you have any feedback on it. Thanks! |
Greetings! It looks like this issue hasn’t been active in longer than one year. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one. |
Describe the bug
The parameter validation logic does not validate the 'max' value specified in the AWS service model; it only checks the 'min' value. As a result, it displays incorrect error messages, suggesting that the max allowed value is always
inf
.Steps to reproduce
Using any recent version of the awscli:
The global accelerator service model has a max value for this parameter of 65535 (and the API will reject requests beyond 65535), but the error message suggests
1-inf
is the valid range.Expected behavior
The error message should display the model's maximum value, if it exists.
Additionally, should the validator validate 'max' constraints, in addition to 'min' ones?
Debug logs
I can put up a pull request for this; it seems like the bug (not reading or checking the max value) is pretty obvious here. Let me know if you think we should validate the max parameter, or just print it correctly when validating the min value.
The text was updated successfully, but these errors were encountered: