{"record":{"id":"f0010a30f83a3d8b","repo":"apache/dolphinscheduler","slug":"backfilltime-backfilltime-is-invalid","errorCode":null,"errorMessage":"backfillTime: ${backfillTime} is invalid","messagePattern":"backfillTime: (.+?) is invalid","errorType":"validation","errorClass":"ServiceException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/validator/workflow/BackfillWorkflowRequestTransformer.java","lineNumber":120,"sourceCode":"        final WorkflowBackFillRequest.BackfillTime backfillTime = workflowBackFillRequest.getBackfillTime();\n        List<Schedule> schedules = processService.queryReleaseSchedulerListByWorkflowDefinitionCode(\n                workflowBackFillRequest.getWorkflowDefinitionCode());\n\n        if (StringUtils.isNotEmpty(backfillTime.getComplementStartDate())\n                && StringUtils.isNotEmpty(backfillTime.getComplementEndDate())) {\n            // todo: why we need to filter the schedules here?\n            return CronUtils.getSelfFireDateList(\n                    DateUtils.stringToZoneDateTime(backfillTime.getComplementStartDate()),\n                    DateUtils.stringToZoneDateTime(backfillTime.getComplementEndDate()),\n                    schedules);\n        }\n        if (StringUtils.isNotEmpty(backfillTime.getComplementScheduleDateList())) {\n            return Arrays.stream(backfillTime.getComplementScheduleDateList().split(\",\"))\n                    .distinct()\n                    .map(DateUtils::stringToZoneDateTime)\n                    .collect(Collectors.toList());\n        }\n        throw new ServiceException(\"backfillTime: \" + backfillTime + \" is invalid\");\n    }\n}\n","sourceCodeStart":102,"sourceCodeEnd":123,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/validator/workflow/BackfillWorkflowRequestTransformer.java#L102-L123","documentation":"BackfillWorkflowRequestTransformer.parseBackfillDateList converts the backfillTime section into a list of ZonedDateTime. If the complementScheduleDateList string is empty or null (StringUtils.isNotEmpty fails), it cannot derive any dates and throws ServiceException(\"backfillTime: \" + backfillTime + \" is invalid\").","triggerScenarios":"Calling the backfill API where the BackfillTime/complement section has a null or empty complementScheduleDateList and no other usable date field, e.g. backfillTime supplied without complementScheduleDateList populated.","commonSituations":"Client sending backfillTime object but leaving the date list blank; dates stripped by serialization; an empty string after the UI cleared a date range; mismatched API schema where the field was renamed so the transformer reads nothing.","solutions":["Provide a non-empty, comma-separated complementScheduleDateList (e.g. \"2026-01-01 00:00:00,2026-01-02 00:00:00\").","Fix the client so it omits backfillTime entirely when there are no dates, or surfaces a UI error first.","Check field naming/schema: ensure the dates land in complementScheduleDateList, not a renamed field.","Wrap the call in try-catch for ServiceException and prompt the user to re-enter the backfill time range."],"exampleFix":"// before\n{\"backfillTime\": {\"complementScheduleDateList\": \"\"}}\n// after\n{\"backfillTime\": {\"complementScheduleDateList\": \"2026-01-01 00:00:00,2026-01-02 00:00:00\"}}","handlingStrategy":"try-catch","validationCode":"const dates = backfillTime?.complementScheduleDateList;\nif (!dates || dates.trim() === '') {\n  throw new Error('complementScheduleDateList is required, comma-separated');\n}","typeGuard":"function hasBackfillTime(bt) {\n  return typeof bt?.complementScheduleDateList === 'string' && bt.complementScheduleDateList.trim() !== '';\n}","tryCatchPattern":"try {\n  backfill(request);\n} catch (ServiceException e) {\n  if (e.getMessage().startsWith(\"backfillTime:\")) {\n    // re-prompt for a valid backfill time / date list\n  }\n  throw e;\n}","preventionTips":["Always send dates as a non-empty comma-separated string.","Omit backfillTime entirely when there are no dates rather than sending blanks.","Validate date format (yyyy-MM-dd HH:mm:ss) client-side.","Confirm schema field names match the current server API version."],"tags":["backfill","date-parsing","request-transform"],"backgroundTag":"invalid-date-format","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"}