apache/dolphinscheduler · warning · ServiceException
10001
10001
Error message
request parameter {0} is not valid What it means
BaseController.checkPageParams validates pagination parameters common to most list endpoints. It throws ServiceException with Status.REQUEST_PARAMS_NOT_VALID_ERROR (code 10001) and the parameter name ('pageNo') when pageNo is zero or negative. The message template 'request parameter {0} is not valid' is filled with 'pageNo'.
Source
Thrown at dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/BaseController.java:49
import java.text.MessageFormat;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
public class BaseController {
/**
* check params
*
* @param pageNo page number
* @param pageSize page size
* @throws ServiceException exception
*/
public void checkPageParams(int pageNo, int pageSize) throws ServiceException {
if (pageNo <= 0) {
throw new ServiceException(Status.REQUEST_PARAMS_NOT_VALID_ERROR, Constants.PAGE_NUMBER);
}
if (pageSize <= 0) {
throw new ServiceException(Status.REQUEST_PARAMS_NOT_VALID_ERROR, Constants.PAGE_SIZE);
}
}
/**
* get ip address in the http request
*
* @param request http servlet request
* @return client ip address
*/
public static String getClientIpAddress(HttpServletRequest request) {
String clientIp = request.getHeader(HTTP_X_FORWARDED_FOR);
if (StringUtils.isNotEmpty(clientIp) && !clientIp.equalsIgnoreCase(HTTP_HEADER_UNKNOWN)) {
int index = clientIp.indexOf(COMMA);
if (index != -1) {View on GitHub (pinned to 02eac45a1b)
Solutions
- Pass pageNo >= 1 (pages are 1-based).
- Clamp/default the page number client-side before the call (e.g. Math.max(1, pageNo)).
- Handle the 10001 status code in the client and surface a 'page number must be positive' message instead of a raw failure.
Example fix
// before GET /projects/1/workflow-definitions?pageNo=0&pageSize=10 // after GET /projects/1/workflow-definitions?pageNo=1&pageSize=10
Defensive patterns
Strategy: validation
Validate before calling
if (pageNo == null || pageNo <= 0) pageNo = 1; // then pass pageNo to the API call
Try / catch
try {
result = client.listWorkflowDefinitions(projectCode, pageNo, pageSize);
} catch (ServiceException e) {
if (e.getCode() == 10001) {
log.warn("Pagination rejected: {} — use 1-based pageNo", e.getMessage());
}
} Prevention
- Remember DolphinScheduler paging is 1-based.
- Clamp page counters to >=1 in client wrappers.
- Map status code 10001 to a friendly validation message.
When it happens
Trigger: Calling any paginated REST API (e.g. GET /projects/{code}/workflow-definitions) with pageNo<=0 in the query string.
Common situations: Client scripts defaulting page counters to 0; off-by-one loop that issues a request for page 0; UI sending uninitialized page state; API wrappers converting a 0-based page index directly.
Understand the failure class
Background: "Invalid query parameter" / "Failed to parse value of ...": fixing bad query string parameters across APIs — this error's family across 36 libraries.
Related errors
- 10001
- skipLineNum must be greater than or equal to 0
- limit must be -1 or greater than 0
- url can not be null
- The execType: {execType} is invalid
AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06).
Data as JSON: /api/errors/80e9ffe4f17d29ee.
Report an issue: GitHub.