apache/dolphinscheduler · warning · ServiceException
10001
10001
Error message
request parameter {0} is not valid What it means
PagingResourceItemRequest.checkPageNoAndPageSize is a DTO self-validation method mirroring BaseController.checkPageParams: it throws ServiceException(REQUEST_PARAMS_NOT_VALID_ERROR, code 10001) with 'pageNo' when pageNo is null-treated-as-0/<=0. It runs during resource-center paging (pagingResourceItemRequest).
Source
Thrown at dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/resources/PagingResourceItemRequest.java:51
@AllArgsConstructor
@NoArgsConstructor
public class PagingResourceItemRequest {
private User loginUser;
private String resourceAbsolutePath;
private ResourceType resourceType;
private String resourceNameKeyWord;
Integer pageNo;
Integer pageSize;
public void checkPageNoAndPageSize() {
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);
}
}
}
View on GitHub (pinned to 02eac45a1b)
Solutions
- Send pageNo >= 1 (1-based pagination).
- Default pageNo to 1 when unset in the calling client.
- Catch/handle the 10001 status and correct pagination before retrying.
Example fix
// before GET /resources?type=FILE&fullName=/&pageNo=0&pageSize=10 // after GET /resources?type=FILE&fullName=/&pageNo=1&pageSize=10
Defensive patterns
Strategy: validation
Validate before calling
if (pageNo == null || pageNo <= 0) pageNo = 1; request.setPageNo(pageNo);
Try / catch
try {
resourceService.pagingResourceItem(request);
} catch (ServiceException e) {
if (e.getCode() == 10001) {
log.warn("Resource paging rejected: {} — pageNo is 1-based", e.getMessage());
}
} Prevention
- Use 1-based pageNo for resource center paging.
- Default missing pageNo to 1 in clients.
- Invoke checkPageNoAndPageSize()/equivalent validation before the service call in custom code.
When it happens
Trigger: Resource center paging requests (e.g. /resources?type=FILE&...&pageNo=0) where pageNo is 0 or negative when the DTO validates itself.
Common situations: 0-based pagination assumptions in client code; omitted pageNo serialized as 0 by a framework; copy-pasted query templates with pageNo=0.
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
- The execType: {execType} is invalid
- {joined failure messages, e.g. Failed do action <executeType
- The releaseState {releaseState} is illegal, please check it.
- taskDepMsg.get()
AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06).
Data as JSON: /api/errors/cc92d86e3f625dda.
Report an issue: GitHub.