Actions
Bug #12493
openscoped search error w/ API param page=0
Description
Passing page=0 as param causes error in scoped search.
2015-11-16T09:18:27 [app] [E] RangeError: invalid page: 0 | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/will_paginate-3.0.7/lib/will_paginate/page_number.rb:18:in `initialize' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/will_paginate-3.0.7/lib/will_paginate/page_number.rb:54:in `new' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/will_paginate-3.0.7/lib/will_paginate/page_number.rb:54:in `PageNumber' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/will_paginate-3.0.7/lib/will_paginate/active_record.rb:186:in `page' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/will_paginate-3.0.7/lib/will_paginate/active_record.rb:167:in `paginate' | /home/vagrant/code/katello/app/controllers/katello/api/v2/api_controller.rb:101:in `scoped_search' | /home/vagrant/code/katello/app/controllers/katello/api/v2/systems_controller.rb:61:in `index'
Updated by Thomas McKay over 8 years ago
Unsure if we should fix or not. Passing in zero worked with elasticsearch so could be considered a regression in behavior since going to scoped. On the other hand, passing zero (or any other "bad" page number) should be discouraged.
Updated by Eric Helms over 8 years ago
- Category deleted (
API) - translation missing: en.field_release set to 86
- Triaged changed from No to Yes
Seems like this is the type of exception that should be caught and sent to the user with a proper return ocde and user friendly message?
Updated by Eric Helms about 8 years ago
- Status changed from New to Need more information
- translation missing: en.field_release changed from 86 to 143
Updated by Justin Sherrill over 7 years ago
- translation missing: en.field_release changed from 143 to 114
Actions