apache/dolphinscheduler · error · ServiceException

REQUEST_PARAMS_NOT_VALID_ERROR

REQUEST_PARAMS_NOT_VALID_ERROR

Error message

Parameter startDateStr is invalid.

What it means

A date-parsing guard in checkAndParseDateParameters: the startDate string parameter failed to parse as a date (empty, wrong format, or not matching the expected yyyy-MM-dd HH:mm:ss pattern), so the API request cannot be filtered by time range. The offending input is the startDate request parameter; parsing is done with strict date format validation before any query runs.

Source

Thrown at dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/BaseServiceImpl.java:123

    @Override
    public boolean canOperatorPermissions(User user, Object[] ids, AuthorizationType type, String permissionKey) {
        boolean operationPermissionCheck =
                resourcePermissionCheckService.operationPermissionCheck(type, user.getId(), permissionKey, log);
        boolean resourcePermissionCheck = resourcePermissionCheckService.resourcePermissionCheck(type, ids,
                user.getUserType().equals(UserType.ADMIN_USER) ? 0 : user.getId(), log);
        return operationPermissionCheck && resourcePermissionCheck;
    }

    /**
     * check and parse date parameters
     */
    @Override
    public Date checkAndParseDateParameters(String startDateStr) throws ServiceException {
        Date start = null;
        if (!StringUtils.isEmpty(startDateStr)) {
            start = DateUtils.stringToDate(startDateStr);
            if (Objects.isNull(start)) {
                log.warn("Parameter startDateStr is invalid.");
                throw new ServiceException(Status.REQUEST_PARAMS_NOT_VALID_ERROR, Constants.START_END_DATE);
            }
        }
        return start;
    }

    @Override
    public boolean checkDescriptionLength(String description) {
        return description != null && description.codePointCount(0, description.length()) > 255;
    }

    protected Date transformDate(String dateStr) {
        Date date = DateUtils.stringToDate(dateStr);
        if (date == null) {
            throw new IllegalArgumentException("dateStr: [" + dateStr + "] is invalid");
        }
        return date;
    }

View on GitHub (pinned to 02eac45a1b)

Solutions

  1. Send startDate in the expected date format (yyyy-MM-dd HH:mm:ss)
  2. Omit the date filter parameters entirely if no time filtering is wanted
  3. Validate date inputs client-side before calling the API
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/BaseServiceImpl.java:123 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06). Data as JSON: /api/errors/9774037b2a5cbfc7. Report an issue: GitHub.