{"record":{"id":"cc92d86e3f625dda","repo":"apache/dolphinscheduler","slug":"10001-cc92d8","errorCode":"10001","errorMessage":"request parameter {0} is not valid","messagePattern":"request parameter (.+?) is not valid","errorType":"error_code","errorClass":"ServiceException","httpStatus":null,"severity":"warning","filePath":"dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/resources/PagingResourceItemRequest.java","lineNumber":51,"sourceCode":"@AllArgsConstructor\n@NoArgsConstructor\npublic class PagingResourceItemRequest {\n\n    private User loginUser;\n\n    private String resourceAbsolutePath;\n\n    private ResourceType resourceType;\n\n    private String resourceNameKeyWord;\n\n    Integer pageNo;\n\n    Integer pageSize;\n\n    public void checkPageNoAndPageSize() {\n        if (pageNo <= 0) {\n            throw new ServiceException(Status.REQUEST_PARAMS_NOT_VALID_ERROR, Constants.PAGE_NUMBER);\n        }\n        if (pageSize <= 0) {\n            throw new ServiceException(Status.REQUEST_PARAMS_NOT_VALID_ERROR, Constants.PAGE_SIZE);\n        }\n    }\n\n}\n","sourceCodeStart":33,"sourceCodeEnd":59,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/resources/PagingResourceItemRequest.java#L33-L59","documentation":"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).","triggerScenarios":"Resource center paging requests (e.g. /resources?type=FILE&...&pageNo=0) where pageNo is 0 or negative when the DTO validates itself.","commonSituations":"0-based pagination assumptions in client code; omitted pageNo serialized as 0 by a framework; copy-pasted query templates with pageNo=0.","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."],"exampleFix":"// before\nGET /resources?type=FILE&fullName=/&pageNo=0&pageSize=10\n// after\nGET /resources?type=FILE&fullName=/&pageNo=1&pageSize=10","handlingStrategy":"validation","validationCode":"if (pageNo == null || pageNo <= 0) pageNo = 1;\nrequest.setPageNo(pageNo);","typeGuard":null,"tryCatchPattern":"try {\n    resourceService.pagingResourceItem(request);\n} catch (ServiceException e) {\n    if (e.getCode() == 10001) {\n        log.warn(\"Resource paging rejected: {} — pageNo is 1-based\", e.getMessage());\n    }\n}","preventionTips":["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."],"tags":["rest-api","pagination","invalid-query-parameter","resource-center"],"backgroundTag":"invalid-query-parameter","analyzedSha":"02eac45a1b6676e639fcbfb4be2243de5771b05d","analyzedAt":"2026-09-06T17:43:00.555Z","contentChangedAt":"2026-09-06T17:43:00.555Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}