apache/dolphinscheduler · error · TaskException

http check condition %s not supported

Error message

http check condition %s not supported

What it means

A switch default guard in validateResponse: the configured httpCheckCondition does not match any known enum constant (STATUS_CODE_DEFAULT, STATUS_CODE_CUSTOM, BODY_CONTAINS, BODY_NOT_CONTAINS), so the framework cannot decide success/failure. The offending input is httpParameters.getCondition()/checkCondition — typically a typo or an enum value from an incompatible version; the message interpolates the unsupported value.

Source

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

                break;
            case STATUS_CODE_CUSTOM:
                if (statusCode != Integer.parseInt(httpParameters.getCondition())) {
                    log.error("http request failed, url: {}, statusCode: {}, checkCondition: {}, body: {}",
                            httpParameters.getUrl(), statusCode, HttpCheckCondition.STATUS_CODE_CUSTOM.name(), body);
                    exitStatusCode = TaskConstants.EXIT_CODE_FAILURE;
                    return;
                }
                break;
            case STATUS_CODE_DEFAULT:
                if (HttpConstants.RESPONSE_CODE_SUCCESS != statusCode) {
                    log.error("http request failed, url: {}, statusCode: {}, checkCondition: {}, body: {}",
                            httpParameters.getUrl(), statusCode, HttpCheckCondition.STATUS_CODE_DEFAULT.name(), body);
                    exitStatusCode = TaskConstants.EXIT_CODE_FAILURE;
                    return;
                }
                break;
            default:
                throw new TaskException(String.format("http check condition %s not supported",
                        httpParameters.getHttpCheckCondition()));
        }

        // default success log
        log.info("http request success, url: {}, statusCode: {}, body: {}", httpParameters.getUrl(), statusCode, body);
        exitStatusCode = TaskConstants.EXIT_CODE_SUCCESS;
    }

    private OkHttpResponse sendRequest() {
        switch (httpParameters.getHttpRequestMethod()) {
            case GET:
                return sendGetRequest();
            case POST:
                return sendPostRequest();
            case PUT:
                return sendPutRequest();
            case DELETE:
                return sendDeleteRequest();

View on GitHub (pinned to 02eac45a1b)

Solutions

  1. Set httpCheckCondition to one of the supported enum names in the task definition
  2. Check for case/whitespace mistakes in the condition string
Defensive patterns

Strategy: type-guard

When it happens

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