No error in case of max limit violation

Bug #1744640 reported by Shiv Kumar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glare
Confirmed
Low
Unassigned

Bug Description

If I pass a limit more than the allowed max limit, Glare does not throw any error. It will give the max limit records and next page link will have the user passed limit. eg:
If Glare max limit is 200 and I pass 1000 as limit.
Glare gives the below response:

"next": "/artifacts/all?marker={{marker}}&limit=1000",
"all":{ 200 records...}

Expected Response:
400 Bad Request.

Mike Fedosin (mfedosin)
Changed in glare:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Kushal Agrawal (kushal2605) wrote :

Hi Mike,

changing this line to a validation will solve this issue. But looks like it was kept here intentional. should I proceed with the change?

https://github.com/openstack/glare/blob/2f5a95cf1da3d8225432f0d7f97d07f0129af42c/glare/api/v1/resource.py#L162

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.