apache/dolphinscheduler · error · RuntimeException

http task params is not valid

Error message

http task params is not valid

What it means

A parameter validation guard in HttpTask.init: httpParameters came back null from JSON parsing or checkParameters() failed — required fields (URL, httpMethod, httpCheckCondition) missing or malformed in the taskParams JSON. The offending input is the task definition's parameter JSON; the task aborts before any HTTP request is attempted.

Source

Thrown at dolphinscheduler-task-plugin/dolphinscheduler-task-http/src/main/java/org/apache/dolphinscheduler/plugin/task/http/HttpTask.java:70

    private TaskExecutionContext taskExecutionContext;

    /**
     * constructor
     *
     * @param taskExecutionContext taskExecutionContext
     */
    public HttpTask(TaskExecutionContext taskExecutionContext) {
        super(taskExecutionContext);
        this.taskExecutionContext = taskExecutionContext;
    }

    @Override
    public void init() {
        this.httpParameters = JSONUtils.parseObject(taskExecutionContext.getTaskParams(), HttpParameters.class);
        log.info("Initialize http task params: {}", JSONUtils.toPrettyJsonString(httpParameters));

        if (httpParameters == null || !httpParameters.checkParameters()) {
            throw new RuntimeException("http task params is not valid");
        }
    }

    @Override
    public void handle(TaskCallBack taskCallBack) throws TaskException {

        OkHttpResponse httpResponse = sendRequest();

        taskExecutionContext.setVarPool(httpParameters.getVarPool());

        validateResponse(httpResponse.getBody(), httpResponse.getStatusCode());
    }

    @Override
    public void cancel() throws TaskException {
    }

    private void validateResponse(String body, int statusCode) {

View on GitHub (pinned to 02eac45a1b)

Solutions

  1. Complete the required HTTP task fields in the task definition (url, httpMethod, httpCheckCondition)
  2. Ensure the taskParams JSON parses into HttpParameters (correct field names/types)
  3. Validate in the UI on save so the error surfaces before execution
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at dolphinscheduler-task-plugin/dolphinscheduler-task-http/src/main/java/org/apache/dolphinscheduler/plugin/task/http/HttpTask.java:70 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/524c01c67ef418dc. Report an issue: GitHub.