-
Improvement
-
Resolution: Unresolved
-
Major
In range notation during pagination, if the from index exceeds the actual array size, Jenkins throws an exception. Can't it return an empty response or something similar instead, so that we know when to stop?
For example, suppose a Jenkins server has 10840 jobs and we want to get all the jobs' details. We keep incrementing the lower bound according to page size (say 1000). Eventually, we hit:
http://server/api/json?tree=jobs[name,url,builds[number,url]]
which throws the following exception:
Caused by: java.lang.IllegalArgumentException: fromIndex(11000) > toIndex(10841)
[JENKINS-39391] Support for from index greater than the actual array size during pagination
Description |
Original:
In range notation during pagination, if the from index exceeds the actual array size, Jenkins throws an exception. Can't it return an empty response or something similar instead? For example, suppose a Jenkins server has 10840 jobs and we want to get all the jobs' details. We keep incrementing the lower bound according to page size (say 1000). Eventually, we hit: http://server/api/json?tree=jobs[name,url,builds[number,url]]{11000,12000} which throws the following exception: Caused by: java.lang.IllegalArgumentException: fromIndex(11000) > toIndex(10841) |
New:
In range notation during pagination, if the from index exceeds the actual array size, Jenkins throws an exception. Can't it return an empty response or something similar instead, so that we know when to stop? For example, suppose a Jenkins server has 10840 jobs and we want to get all the jobs' details. We keep incrementing the lower bound according to page size (say 1000). Eventually, we hit: http://server/api/json?tree=jobs[name,url,builds[number,url]]{11000,12000} which throws the following exception: Caused by: java.lang.IllegalArgumentException: fromIndex(11000) > toIndex(10841) |
Labels | New: robustness |
Labels | Original: robustness | New: newbie-friendly robustness |
Assignee | New: Maria [ mariakax3 ] |
Assignee | Original: Maria [ mariakax3 ] |