{"record":{"id":"524c01c67ef418dc","repo":"apache/dolphinscheduler","slug":"http-task-params-is-not-valid","errorCode":null,"errorMessage":"http task params is not valid","messagePattern":"http task params is not valid","errorType":"validation","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-task-plugin/dolphinscheduler-task-http/src/main/java/org/apache/dolphinscheduler/plugin/task/http/HttpTask.java","lineNumber":70,"sourceCode":"    private TaskExecutionContext taskExecutionContext;\n\n    /**\n     * constructor\n     *\n     * @param taskExecutionContext taskExecutionContext\n     */\n    public HttpTask(TaskExecutionContext taskExecutionContext) {\n        super(taskExecutionContext);\n        this.taskExecutionContext = taskExecutionContext;\n    }\n\n    @Override\n    public void init() {\n        this.httpParameters = JSONUtils.parseObject(taskExecutionContext.getTaskParams(), HttpParameters.class);\n        log.info(\"Initialize http task params: {}\", JSONUtils.toPrettyJsonString(httpParameters));\n\n        if (httpParameters == null || !httpParameters.checkParameters()) {\n            throw new RuntimeException(\"http task params is not valid\");\n        }\n    }\n\n    @Override\n    public void handle(TaskCallBack taskCallBack) throws TaskException {\n\n        OkHttpResponse httpResponse = sendRequest();\n\n        taskExecutionContext.setVarPool(httpParameters.getVarPool());\n\n        validateResponse(httpResponse.getBody(), httpResponse.getStatusCode());\n    }\n\n    @Override\n    public void cancel() throws TaskException {\n    }\n\n    private void validateResponse(String body, int statusCode) {","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-task-plugin/dolphinscheduler-task-http/src/main/java/org/apache/dolphinscheduler/plugin/task/http/HttpTask.java#L52-L88","documentation":"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.","triggerScenarios":"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.","commonSituations":"See trigger scenarios.","solutions":["Complete the required HTTP task fields in the task definition (url, httpMethod, httpCheckCondition)","Ensure the taskParams JSON parses into HttpParameters (correct field names/types)","Validate in the UI on save so the error surfaces before execution"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}